This demo uses the CSS Sticky Headers widget which uses CSS transforms to reposition the table head.
CSS transforms are supported by most modern browsers (not IE8 and older).
The jQuery UI themed table does not stick to the top of the page due to the extra padding. Adjust the cssStickyHeaders_offset option as desired. I didn't bother in this demo because it includes more than just the jQuery UI theme.
This widget will not work with the original tablesorter, but works optimally with tablesorter v2.8+ (Added v2.14.2; Updated v2.14.4)
In v2.16.4, added the cssStickyHeaders_filteredToTop option. When true the table top will scroll into view after being filtered. This is done because if the sticky header is active, and a filter results in say only one row, the table will scroll up out of the browser viewport. If setn to false, no scrolling is done.
In v2.14.4:
Added cssStickyHeaders_attachTo (default set to null). Setting this option with either a jQuery selector string (".wrapper") or jQuery object ($(".wrapper")) to attach the sticky header to this element - see the second example below.
Removed cssStickyHeaders_offsetX option & renamed cssStickyHeaders_offsetY to cssStickyHeaders_offset as the horizontal offset is not required.