FixedContent.js [jQuery]

A mobile-friendly, jQuery plugin that persists content (sidebar, nav, etc.) while scrolling. There are also some settings builtin that you can customize, like e.g. a fixed margin-top (margin will remain as the page is scrolled), a min-width value (disables the plugin on mobile devices or narrow screens) and a z-index value.

I like the fact that if the height of your ‘fixed element’ is taller than the viewport, the plugin is disabled and the content will scroll with the page so nothing gets cut off. But also that this fixed element will fill its parents width, both when the page is loaded and if the window is resized.

Use this plugin sparingly tho. Most content should scroll naturally with the page. Determine whether it lends context or functionality as the page is scrolled!


A jQuery plugin by Jeremy Church.


Article Navigation

Wait .. there's more!

Online CV Jan Rajtoral