How do people switch fixed elements when scrolling down the page? Here’s a perfect example of what I mean at www.Joel.is. If you look at the share buttons, as you scroll down past one post, the share button of the next post replaces the previous one using position:fixed
I have only seen posts that answer how to create the initial fixed position, but not switching. (http://stackoverflow.com/questions/4907872/changing-an-elements-css-position-after-scrolling-down-the-page).
You would use the same principles, but edit the style of the element.
and then:
or for jQuery: