Skip to content

Instantly share code, notes, and snippets.

@toshimaru
Last active July 21, 2024 00:02
Show Gist options
  • Select an option

  • Save toshimaru/6102647 to your computer and use it in GitHub Desktop.

Select an option

Save toshimaru/6102647 to your computer and use it in GitHub Desktop.

Revisions

  1. toshi revised this gist Aug 6, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery-scroll-bottom.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    $(window).on("scroll", function() {
    var scrollHeight = $(document).height();
    var scrollPosition = $(window).height() + $(window).scrollTop();
    if ((scrollHeight - scrollPosition) / scrollHeight <= 0) {
    if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
    // when scroll to bottom of the page
    }
    });
  2. toshi revised this gist Jul 29, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery-scroll-bottom.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    $(window).on("scroll", function() {
    var scrollHeight = $(document).height();
    var scrollPosition = $(window).height() + $(window).scrollTop();
    if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
    if ((scrollHeight - scrollPosition) / scrollHeight <= 0) {
    // when scroll to bottom of the page
    }
    });
  3. toshi revised this gist Jul 29, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery-scroll-bottom.js
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,6 @@ $(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
    // when scroll to bottom of the page
    }
    });
  4. toshi created this gist Jul 29, 2013.
    7 changes: 7 additions & 0 deletions jquery-scroll-bottom.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    $(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
    }
    });