Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
161
rated 0 times [  162] [ 1]  / answers: 1 / hits: 25736  / 13 Years ago, sun, april 10, 2011, 12:00:00

On a prominent news site (sry, can't remember exactly which one) I saw a really cool effect... when you scroll near the bottom of the page, a new element slides down from the top of the browser viewport with a lot of social media options (tweet, share on facebook, etc). I'd like to emulate something somewhat similar... in fact, there's really a ton of things I could think of to do if I knew how to trigger a function when the user is near the bottom of the page...



So, my question is very basic: how does one trigger a function when the user has scrolled near the bottom of a dynamically sized page?


More From » jquery

 Answers
31

If you have an element thats near the bottom of the page, you can use Waypoints to trigger a function when the user scrolls to that element. Or if you want to use a pixel limit like in Hussein's post, make sure to heed the scroll lessons we learned from twitter


[#92828] Thursday, April 7, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mathewb

Total Points: 535
Total Questions: 95
Total Answers: 96

Location: British Indian Ocean Territory
Member since Fri, Oct 15, 2021
3 Years ago
;