I have the following Javascript, and a warning appears, as it is supposed when the scroll bar gets to the bottom of the page.
However, I would like this to happen 100 pixels before it hit the bottom. How should I do it?
$(window).scroll(function(){
if($(window).scrollTop() == $(document).height() - $(window).height() ){
alert("at bottom");
}
}
source
share