Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions js/jquery.pageguide.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
$guide = (typeof guide === 'string') ? $(guide) : null;

if ($guide) {
if (!$guide.size()) return this;
if (!$guide.length) return this;

guide = {
title: $guide.data('tourtitle'),
Expand All @@ -370,7 +370,7 @@
guide.steps.push(step);
});
} else {
$guide = ((guide.id && $('#' + guide.id).size()) ? $('#' + guide.id).empty() : $('<ol/>', {
$guide = ((guide.id && $('#' + guide.id).length) ? $('#' + guide.id).empty() : $('<ol/>', {
id: guide.id || 'pageGuide' + PageGuide.uid(),
'class': 'pageguide-guide'
})).data('tourtitle', guide.title);
Expand Down Expand Up @@ -516,7 +516,7 @@
* If -n < x < 0, then the result of x % n will be x, which is
* negative. To get a positive remainder, compute (x + n) % n.
*/
var newIdx = (this.curIdx + this.$visibleItems.size() - 1) % this.$visibleItems.size();
var newIdx = (this.curIdx + this.$visibleItems.length - 1) % this.$visibleItems.length;

this.$wrapper.trigger('previous.pageguide');
this.showStep(newIdx, 1);
Expand All @@ -532,7 +532,7 @@
next: function() {
if (!$('body').is('.pageguide-open')) return this;

var newIdx = (this.curIdx + 1) % this.$visibleItems.size();
var newIdx = (this.curIdx + 1) % this.$visibleItems.length;

this.$wrapper.trigger('next.pageguide');
this.showStep(newIdx, -1);
Expand Down Expand Up @@ -870,7 +870,7 @@
$(this).data('idx', i);
});

if ((this.settings.autoAdvanceInterval || this.settings.autoStart) && this.$visibleItems.size() > 0) {
if ((this.settings.autoAdvanceInterval || this.settings.autoStart) && this.$visibleItems.length > 0) {
if (this.settings.autoStartDelay) {
setTimeout($.proxy(function () {
this.showStep(0);
Expand Down Expand Up @@ -977,4 +977,4 @@

return pg ? pg.load(fn, options) : (pg = new PageGuide(fn, options));
};
}));
}));