Q:

Is it possible to repeat table headers with jQuery DataTables?

I'm using the jQuery DataTables plugin, which is working really great so far. However my table is quite long so I want to repeat the headers every ~30 rows or so. I tried it and got this alert when I loaded the page:

DataTables warning: Unexpected number of TD elements. Expected 5230 and got 4980. DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.

I changed the cells to TD instead of TH but now they don't stay in place when sorting, for obvious reasons, they just get grouped together. Is there a way round this? DataTables allows custom parsers but I can't think of any way to make every n rows stay in the same position.

A:

There is a fixed header add-on that works with datatables that you may be interested in.

