Skip to content

Instantly share code, notes, and snippets.

@dustintheweb
Last active December 16, 2015 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustintheweb/5473421 to your computer and use it in GitHub Desktop.
Save dustintheweb/5473421 to your computer and use it in GitHub Desktop.
Check if a user is scrolling
// jquery >> Scroll Check >>>>>>>>>>>>>>>>
// prereq: debounce: https://github.com/cowboy/jquery-throttle-debounce
$(window).scroll($.debounce( 250, true, function(){ // +++ if scrolling
// do something
}));
$(window).scroll($.debounce( 250, function(){ // +++ if not...
// do something else
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment