Makes headers stick to the top of the screen while staying within their container
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.markdown
jquery.stuckontop.js

README.markdown

StuckOnTop

Demo

Stuck on top is a simple jQuery plugin that sticks a specified element to the top of the screen while keeping it within it's container.

Usage

$("#container").stickyHeaders();

OR

$("#container").stickyHeaders(options);

Options headerClass: The css class of the header to stick to the top of the page. Defaults to header.

padding: The amount of padding to apply to the top of the screen before the header gets stuck. Useful if you have a fixed menu bar at the top of your page. Defaults to 0px.