Learn free online HTML5, javascript, and jquery Tutorials by Examples

Monday 25 January 2021

Detect the scrolling to bottom of the page using jQuery.

$(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 

        

}); 

1 comment: