jQuery FreezeTable

The jquery.freezetable plugin freezes the header row of a table and adds a scroll bar to allow a long table to be scrolled vertically.

View Demos


Download FreezeTable from GitHub

Instructions & Help

The table markup needs to adhere to the HTML 4.01 Specification for Tables. The row groups THEAD and TBODY are used to determine which sections of the table should be frozen. jquery.freezetable clones the table and removes the TBODY from the cloned copy to ‘freeze’ the header. It then removes the THEAD from the original table to make the scrollable portion of the table. jquery.freezetable also depends on COLGROUP to maintain consistent column styling between the original and cloned header table.

Expected <table> markup

<table id="mytable">
    <col class="column-make" />
    <col class="column-display" />
    <col class="column-country" />       


$(document).ready(function () {
        'autoHeight': false,
        'height': 160


Integer – The height of the scrollable part of the table. Only used when ‘autoHeight’ is true.
Default: 480
Integer – The width of the area to the right of the table reserved for the scrollbar.
Default: 20
Boolean – When ‘true’ the scrollable section of the table will streach to fill the browser window.
When ‘false’ the scollable section of the table will determined by the ‘height’ option.
Default: false
Integer – The size of the margin between the bottom of the browser window and the table when ‘autoHeight’ is true.
Default: 20

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.