3 ms·
How does this compare to say Bootstrap's affix plugin? I see that it supports a min-width property, but personally I'd rather deal with this myself via media qu
by WickyNilliams 14y ago
How does this compare to say Bootstrap's affix plugin? I see that it supports a min-width property, but personally I'd rather deal with this myself via media queries (matchMedia API in JS) than have a limited option via the plugin.
- bobfunk 14y agoThe difference is being able to specify a containing element, so the pinned part gets unpinned once you scroll past the bottom of the container. We first developed the plugin for the Webpop gallery page (http://www.webpop.com/gallery http://www.webpop.com/gallery) to make the description next to each screenshot stick to the top while you were viewing that gallery entry. Later we also used it for the pinned navigation in our documentation section to make sure it didn't stay fixed and overlapped the footer once you scroll down to the bottom of the page. As far as I know Bootstrap's affix doesn't really help you there.