Created
July 17, 2014 12:55
-
-
Save marioblas/8af4cdf73cb30c2c2be4 to your computer and use it in GitHub Desktop.
jQuery - Check if a user has scrolled to the bottom
This file contains 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
/** | |
* Check if a user has scrolled to the bottom. | |
* | |
* Source: http://stackoverflow.com/questions/3898130/how-to-check-if-a-user-has-scrolled-to-the-bottom | |
*/ | |
$(window).scroll(function() { | |
if( $(window).scrollTop() + $(window).height() == $(document).height() ) { | |
console.log("bottom!"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment