How to accomplish floating the tables header when the user scrolls?

100 Views Asked by At

Here are my use-cases:

I want to be able to float the tables headers in the page when the user scrolls down in the page. the headers should remain over the table until the user scrolls past the table. This should work for both for vertical and horizontal scrolling. It should also work after the user resizes the window and support ie8.

Bonus: I also need to be able to do the same thing inside of a container that has overflow:scroll and a table inside.

Does anyone know of a plugin that tackles both of these use-cases?

edit: I should say that datatables is too big of a plugin for this. It does not support tables with complex headers that I use, and like i said, its 100+ K of code that I would rather not include for this feature.

0

There are 0 best solutions below