Last active
December 16, 2015 17:50
-
-
Save dustintheweb/5473421 to your computer and use it in GitHub Desktop.
Check if a user is scrolling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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