CSS
position: sticky;
is really in its infancy in terms of browser support. In stock browsers, it is currently only available in iOS 6. In Chrome it is locked behind achrome://flags
setting. Fixed-sticky is a polyfill to enabling this in browsers that don’t support it yet.
position: sticky;
is one very handy addition to CSS, paving the cowpaths.
Fixed-Sticky (Github) →
Fixed-Sticky Demo →
Related: the aforementioned jQuery Sticky Objects and jQuery Stick’em. Whilst they look similar in result, position: sticky;
is the way to go.
The CSS sticky spec is still in development at the moment and is subject to change. It is safer to implement a Javascript solution for now. I found one here that does the job: http://www.andrewlowndes.co.uk/blog/front-end/sticky-css-_-js-function