Home › Forums › JavaScript › Small jQuery plugin dilemma › Reply To: Small jQuery plugin dilemma
August 26, 2014 at 4:46 pm
#180792
Participant
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
.nav.is-fixed { /* alternative styles */ }