With the following code, I am trying to find when the user scrolls to the bottom of the page. In JQuery mobile.
$(window).scroll(function(){
if($(window).scrollTop() == $(document).height() - $(window).height()){
alert("The Bottom");
}
});
For now I am just wanting it to output that they have reached the bottom.
My problem is, when the site loads, it will output this message. When I scroll to the bottom it will then output the alert.
Is there a way to stop it doing it for when the page has loaded and only do it when the user has physically scrolled the page?
Thanks