Permalink
Browse files

Handle more than one missing tip target

  • Loading branch information...
1 parent 774f64c commit 10d211818aa50e81573f76c0e3362e039df4165b @kennethkalmer committed Nov 18, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 jquery.joyride-1.0.1.js
@@ -89,13 +89,16 @@
showNextTip = function() {
var parentElementID = $(tipContent[count]).attr('data-id'),
parentElement = $('#' + parentElementID);
-
- if (parentElement.offset() === null) {
+
+ while (parentElement.offset() === null) {
count++;
skipCount++;
prevCount++;
parentElementID = $(tipContent[count]).attr('data-id'),
parentElement = $('#' + parentElementID);
+
+ if ($(tipContent).length < count)
+ break;
}
var windowHalf = Math.ceil($(window).height() / 2),
currentTip = $('#joyRidePopup' + count),

0 comments on commit 10d2118

Please sign in to comment.