Permalink
Browse files

Merge pull request #5 from RussTheAerialist/master

make ceaseFire work on each scroll trigger
  • Loading branch information...
2 parents 97ced58 + 1a7682a commit 5d0345d571a205511a3f3f643fd61ba98730373b @fredwu fredwu committed Sep 25, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 js/jquery.endless-scroll.js
@@ -78,6 +78,11 @@
if (firing === true)
{
$(this).scroll(function() {
+ if (options.ceaseFire.apply(this) === true)
+ {
+ firing = false;
+ return; // Scroll will still get called, but nothing will happen
+ }
if (this == document) {
var is_scrollable = $(document).height() - $(window).height() <= $(window).scrollTop() + options.bottomPixels;
} else {
@@ -129,4 +134,4 @@
}
};
-})(jQuery);
+})(jQuery);

0 comments on commit 5d0345d

Please sign in to comment.