Here is a simple jQuery plugin to make a table header fixed on top when window is scrolled. Using the code from twitter bootstrap documentation page, this code is customized for table header. Create the table with following layout - ...
Column 1 Column 2 Column 3
Data Column 1 Data Column 2 Data Column 3
Add the css from the file "table-fixed-header.css" To apply it to above table, call - $('.table-fixed-header').fixedHeader(); It can take two parameters - bgColor - background color of the fixed header topOffset - offset from top of windows where the fixed-header will be positioned (default is 40) If you use any other value for topOffset, update the "top" parameter CSS as well accordingly. For example, if there is no fixed navbar, you can set topOffset to 0 - $('.table-fixed-header').fixedHeader({topOffset: 0}); Also update the CSS to - top: 0;