Right now I fire an event when the user has reached the bottom of the page using this:
$(window).scroll(function() {
if($(window).scrollTop() == $(document).height() - $(window).height()) {
// do something
}
});
How can this be modified to fire the event when the user reached almost the end of the page, let’s say 300px left?
1 Answer