Nested tables with tablesorter

强颜欢笑 提交于 2019-12-21 01:19:09

问题


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.

I would like to have either:

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

but not the status quo.


回答1:


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 > ...



来源:https://stackoverflow.com/questions/4252733/nested-tables-with-tablesorter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!