The simplest way to pin a table header or any other HTML element to the top of the page.
Some Reasons To Use:
position: fixed
is not enough- Sticky is dependent free
- Sticky with tables
- Weights less than 2KB
Use "sticky" as id of the element:
<div id="sticky">Some Content</div>
And then add the sticky.js source on body end:
<script src="sticky.js"></script>
</body>
Get Sticky to use Today
- Download it; or
- Using Bower
$ bower install sticky