-
-
Save phuonglop12a2/cda86b14c363dc4d02438e930e6ef7f7 to your computer and use it in GitHub Desktop.
Detect the scrolling to bottom of the page using jQuery.
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
$(window).on("scroll", function() { | |
var scrollHeight = $(document).height(); | |
var scrollPosition = $(window).height() + $(window).scrollTop(); | |
if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
// when scroll to bottom of the page | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment