With the following code, I am trying to find when the user scrolls to the bottom of the page. In a jQuery mobile device.
$(window).scroll(function(){ if($(window).scrollTop() == $(document).height() - $(window).height()){ alert("The Bottom"); } });
For now, I just want him to deduce that they have reached the bottom.
My problem is that when the site loads, it displays this message. When I go down, he gives a warning.
Is there a way to stop it from loading the page and only do it when the user physically scrolls the page?
thanks
Rory standley
source share