The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Small jQuery plugin dilemma Reply To: Small jQuery plugin dilemma


The plugin gets the position of current element, once the scroll is at the same position it makes that element fixed, taking it out of flow. So it doesn’t matter if element is floated or whatever, you’re essentially restyling it.

so that ALL properties of the original element are retained

.nav {  /* original styles */}

the sticky item will look like it’s the original one { /* alternative styles */ }