You know those fixed positioned navigations, that are too long for your display to show all items at once? This is a jQuery plugin which provides a clever solution for you to keep these, without compromising your visitors experiences.
- Uncompressed: dist/jquery.scrollable-sticky.js
- Compressed: dist/jquery.scrollable-sticky.min.js
Also available through bower.
- Grab the JS file
- Include it, duh :-)
- Use scrollableSticky on your jQuery object
Note: The element which you want to have fixed, doesn't have to be fixed already. The appropriate position will be calculated so the element will only move vertically.
$('div.fixme').scrollableSticky();
Check demo/index.html. Clone or grab a zip, then open this file in your browser.
offset
is used to specify a margin below the floating element