Fork me on GitHub

Common Use-Case: Window Scrolling

The table header sticks to the top of the page as you scroll down. This is done via absolute positioning it there, you can change it to use fixed positioning if you set position to 'fixed'.

Absolute positioning is a good default because you do not need to call $table.floatThead("reflow") if the table's position changes because of some changes in the DOM

$('table').floatThead({
    position: 'absolute'
});

Re-initialize plugin with fixed positioning

floated header is using position:absolute

Header 1 Header 2 Header...3 Description
wooo cat
abc cat
last
1 blah blah blah blah blah blah blah blah blah blah blah blah
2 blah blah blah blah blah blah blah blah blah blah blah blah
3 blah blah blah blah blah blah blah blah blah blah blah blah
4 blah blah blah blah blah blah blah blah blah blah blah blah
5 blah blah blah blah blah blah blah blah blah blah blah blah
6 blah blah blah blah blah blah blah blah blah blah blah blah
7 blah blah blah blah blah blah blah blah blah blah blah blah
8 blah blah blah blah blah blah blah blah blah blah blah blah
9 blah blah blah blah blah blah blah blah blah blah blah blah
10 blah blah blah blah blah blah blah blah blah blah blah blah
11 blah blah blah blah blah blah blah blah blah blah blah blah
12 blah blah blah blah blah blah blah blah blah blah blah blah
13 blah blah blah blah blah blah blah blah blah blah blah blah
14 blah blah blah blah blah blah blah blah blah blah blah blah
15 blah blah blah blah blah blah blah blah blah blah blah blah
16 blah blah blah blah blah blah blah blah blah blah blah blah
17 blah blah blah blah blah blah blah blah blah blah blah blah
18 blah blah blah blah blah blah blah blah blah blah blah blah
19 blah blah blah blah blah blah blah blah blah blah blah blah
20 blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah