Fork me on GitHub

Frequent Issues

plugin doesn't work when table is in a bootstrap3/jqueryui tab
after version 1.2.12, this plugin should work within bootstrap3/jqueryui tabs by listening to tab change events. Make an issue if its still busted.
The scrolling container has absolute position with top:0;left:0;right:0;bottom:0 css
init plugin with position:'fixed' and see this example solution: issue 205
scroll container is not working (header does not float)
scroll container should be the closest parent of table with position:relative;overflow:auto;height:n px;. If it is not, things wont work. The scroll container must be the container that scrolls both the x and y axis. It also helps if the container is as close to the table as possible (in terms of number of element between the scroll container and table)
IE ONLY: header noticeably skips/jumps as you scroll
I did a bit of IE researching and found that by unchecking IE's "Use smooth scrolling" setting, this issue no longer exists. You can do this by clicking the settings cog/gear -> Internet Options -> Advanced (tab) -> Browsing -> "Use smooth scrolling" (uncheck).
see issue #233

Plugin Best Practices

Do this, and you will avoid a lot of headaches not just with this plugin, but with your layouts in general

This plugin works by moving your table's header into a new table that it creates, it then floats that table in the correct position. In order to accomplish this the plugin expects a few things to be true:

TLDR:
Your table's styles must continue to style the newly created table which will live inside of a container div appended below your real table. The new table will have the same class(es) as your original table. The table must be visible when you run the plugin ⟶If it is not, you will need to trigger a reflow event on it when it becomes visible.

Ideal world:

table.myTable { ... }
div.table-container table { ... }

Will also work:

Will not work:

#myTableRocks td { color: blue; }