Makes table headers stick to the top of the viewport when scrolling down HTML data tables.
HTML JavaScript CSS
Latest commit 32ee8bb Sep 1, 2015 @kingkool68 Merge pull request #5 from epsimatic/master
Make code compatible with jQuery.noConflict();

README.md

stickyHeader.js makes table headers stick to the top of the viewport when scrolling down long HTML data tables. Slides for the presentation I gave at the September DC jQuery Meetup can be found at http://www.slideshare.net/kingkool68/stickyheaderjs

Versions for

  • jQuery
  • Prototype
  • Moo Tools
  • Dojo Toolkit

To get started just include:

  1. stickyHeader.js
  2. The two CSS rules to your stylesheet
  3. class="stickyHeader" to any table that you want to have a stickyHeader

CSS Rules

    .hide {
        display:none;
    }
    div.stickyHeader {
        top:0;
        position:fixed;
        _position:absolute;
    }

Demos