Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nested tables with tablesorter

I have nested tables within a table that has the tablesorter applied to it.

It adds sort headers to the nested tables, but they don't sort the rows and a Javascript error is thrown.

alt text

I would like to have either:

  • the nested tables not sortable
  • the sorting on the nest tables actually work.

but not the status quo.

like image 336
John Mills Avatar asked Nov 23 '10 04:11

John Mills


1 Answers

Your first option is much easier (making the nested tables not sortable):

Construct the table something like so:

$('.tablesorter').tablesorter({selectorHeaders: '> thead > tr > th'});

And then you might also need to prefix all your css with something like:

table.tablesorter > thead > tr > ...

like image 71
chbrown Avatar answered Sep 20 '22 17:09

chbrown