Skip to content

Instantly share code, notes, and snippets.

@lutzissler
Created November 12, 2013 13:32
Show Gist options
  • Select an option

  • Save lutzissler/7430870 to your computer and use it in GitHub Desktop.

Select an option

Save lutzissler/7430870 to your computer and use it in GitHub Desktop.
Scroll stop event for jQuery. Remember that scroll events don’t bubble, so this will only catch full page scrolls.
(function($) {
var timer;
$(window).bind("scroll", function (e) {
clearTimeout(timer);
timer = setTimeout(function () {
$(window).trigger("scrollstop");
}, 150);
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment