Please look at the demo I created in codepen:
http://codepen.io/leomao10/pen/tEuqC
I tried to affix the table header and the new table header created by affix.js will not use its original width.
That bugs me for a day and still don't have a clue.
it because after position:fixed for thead, rowspan doesn't work for TH.
set fixed width should help (works in chrome):
$(".floating-header th").each(function() {
$(this).width($(this).width());
});
Yay, the header looks good now :)
It haven't work perfectly because the columns in tbody will changed its width when affix.js hide the origin header.
But I have some idea how to fix that.
@genbit, Thanks for your help
When you position something, you need to specify a width. We won't support fixing table headers at this time.