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


That’s what I’m confused about.

Well, my plugin doesn’t care if the element is floated, or full-width, or whatever. It works for “any” type of element. That’s why I clone it — so that ALL properties of the original element are retained, and the sticky item will look like it’s the original one.

I think you’re kind of missing the point of the plugin. It’s coded in such a way that you can use on any element in your page (without having to add new or alternative styles).
If the element is not a (full-width) menu, then you’ll need a lot more than just some vertical padding to make sure the rest of the page doesn’t act funky once the element gets sticky.

See the pen in the original post.