A lightweight and adaptive jQuery plugin for pinning any element to the page or to a container element, so that the element stays visible even if the user scrolls the page. This type of elements are also referred to as “fixed position elements” or “sticky elements”.
You can use it in your projects to create sticky sidebars, sticky navigation, sticky headers and footers, or anything else you feel the need to make it stick to the page while the user scrolls.
Features:
elements can be pinned inside a container element, not just to the page
custom events are fired when pinning/unpinning elements offering even more control
it is small – it weights around 2KB minified offering the best ratio of features per used bytes
it’s cross-browser – works in every major browser and IE7+