Swap CSS class on the basis of Scroll Position with Javascript
Posted
by Brian
on Stack Overflow
See other posts from Stack Overflow
or by Brian
Published on 2009-10-10T18:50:40Z
Indexed on
2010/05/19
16:40 UTC
Read the original article
Hit count: 479
I'm looking to re-create the Apple Store shopping cart sidebar.
http://store.apple.com/us/configure/MB535LL/A?mco=MTA4MTg3NTQ
It is similar to "position: fixed" except that it starts out as "position: absolute" with the CSS class "pinned_top" and then switches to CSS class "floating" when a certain scroll-y position is reached.
I've looked EVERYWHERE for this, it seems a tutorial should be obvious but I'm yet to find anything. Any help?
© Stack Overflow or respective owner