browser scrollbars - Alert using Jquery when Scroll to end of Page -


Is there a way to detect page end by using Jquery, so that a simple message can be shown that your Have reached the end page

:

  if (document .documentElement.clientHeight + $ (document) .scrollTop ()> gt; document.body.offsetHeight) {// Display warning or whatever you want to do, when you go to the bottom of the page // Warning ("You At the bottom of the page. "); }  

Of course, whenever the user scrolls:

  $ (window) .scroll (function () {if (Document DocumentElement.clientHeight + $ (document) ) .scrollTop () & gt; = document.body.offsetHeight) // // Display the warning or whatever you want to do, // the // warning you at the bottom of the page ("You" again at the bottom of the page ");}});  

While scrolling down the page" You are doing! Scroll to the top of the page "Scroll to the link.

Reference:


Comments