Skip to content

Instantly share code, notes, and snippets.

@danielchikaka
Forked from toshimaru/jquery-scroll-bottom.js
Last active August 29, 2015 14:15
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 danielchikaka/bcb5927f984360b9a8fb to your computer and use it in GitHub Desktop.
Save danielchikaka/bcb5927f984360b9a8fb to your computer and use it in GitHub Desktop.
$(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