I have the below Javascript, and the alert shows up as it is supposed to when the scrollbar hits the bottom of the page.
However, I would like this to happen 100 pixels before it reaches the bottom. How would I do that?
$(window).scroll(function(){
if($(window).scrollTop() == $(document).height() - $(window).height() ){
alert("at bottom");
}
}