我在同一张桌子里有两个不同的人。我只想在第一个tbody上使用表格分类器。有没有办法跳过使用tablesorter单独的第二个t ???
<table>
<tbody id="1"></tbody> /* Apply table sorter for this tbody */
<tbody id="2"></tbody> /* Don't Apply table sorter for this tbody*/
</table>
答案 0 :(得分:0)
我猜你正在使用支持fork of tablesorter的sorting multiple tbodies。原始插件只对第一个tbody进行排序。
如果您希望tablesorter忽略任何tbody,只需将类名tablesorter-infoOnly
添加到tbody即可。此类名由cssInfoBlock
option设置。
请注意,除非表格包含thead
,否则tablesorter将无法使用您在上面共享的HTML。
答案 1 :(得分:0)
将第二个tbody作为另一个表,并使用CSS使它们看起来像一个表。
<table>/* Apply table sorter for this table */
<tbody id="1"></tbody>
</table>
<table>/* Don't Apply table sorter for this table*/
<tbody id="2"></tbody>
</table>