I know how to call a function when scrolling hits the bottom of the page.
$(window).scrollTop() == $(document).height() - $(window).height()
But I would like to do it a little bit before it hits the bottom. How would I accomplish this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
check this example
-10indicates how far away from end of page user must be before function executes. This gives you the flexibility to adjust the behavior as needed