How to check if the bottom of web page has been reached

This is just a small tip for the Javascript developers out there. Sometimes you may want to quickly detect when the bottom of a page has been reached. A handy way to do this when using jQuery is to check the following condition:

$(window).scrollTop() + $(window).height() == $(document).height() 

Leave a Reply

Your email address will not be published. Required fields are marked *