Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You should look into jquery waypoints --> http://imakewebthings.github.com/jquery-waypoints/

I use it on my blog to change how social buttons behave once you scroll past a certain point.



That is so amazingly sexy. Thank you :D

These sticky elements seem to scroll with the page (or stick?) much more smoothly than I've seen on other pages. Are there crappy versions out there or could I just be experiencing a newer browser optimization?


It's a simple trick. Instead of using JavaScript to stick them on the page, you change their positioning to fixed when they hit the window's edge. Then the browser takes care of the rest.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: