A simple jquery plugin to freeze header row in html table.
Switch branches/tags
Clone or download
Permalink
Failed to load latest commit information.
css start project Apr 14, 2013
images #16 Jan 5, 2017
js Delete jquery-1.9.1.js Oct 17, 2017
LICENSE.md Create LICENSE.md May 18, 2013
README.md Update README.md Jan 5, 2017
freezeheader.jquery.json Update freezeheader.jquery.json Jul 18, 2015

README.md

jquery.freezeheader

A simple jquery plugin to freeze header row in html table.

Installation

Include script after the jQuery library (unless you are packaging scripts somehow else):

<script src="/path/to/jquery.freezeheader.js"></script>

Usage

Create a table with fixed header in the top browser:

        $(document).ready(function () {
            $("#tableid").freezeHeader();
        })

Create a table with fixed header and scroll bar:

        $(document).ready(function () {
            $("#tableid").freezeHeader({ 'height': '300px' });
        })

Create a table with fixed header and offset:

        $(document).ready(function () {
            $("#tableid")freezeHeader({'offset' : '51px'})
            .on("freeze:on", function( event ) {
                    //do something
            }).on("freeze:off", function( event ) {
                    //do something
            });
        })

Demo

http://laertejjunior.github.io/freezeheader/

Development

Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

Authors

Laerte Mercier Junior