How to select a column by clicking on a fixed header ?
How to select a column by clicking on a fixed header ?
Hi Everyone,
What I'm trying to achieve is a column selection by either clicking on a fixed header <th />
.
In fact, everything works when I use a simple table header, since it belongs to the actual datatables-enhanced table.
When using a fixed header, the click on the header is not listened (I guess because of the header duplication needed for the fixed header feature).
Example: http://live.datatables.net/rediqabe/1/edit
Could you perhaps give me a suggestion on how to handle this properly?
Answers
I managed to get the click by using the
.dataTables_scrollHead
and using the data.My mistake was trying to bind the click on the original table header, which is underneath the copy (given the FixedHeader feature).
I hope this is the correct way to do that.