gpt4 book ai didi

jquery - 在 jquery table sorter 2.0 中对具有多个 的表进行排序

转载 作者:行者123 更新时间:2023-12-01 01:47:52 25 4
gpt4 key购买 nike

我有一张 table ,可以说

<table id="myTable">
<thead>
<th>id</th>
<th>name</th>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Sam</td>
</tr>
</tbody>
<tbody>
<tr>
<td>2</td>
<td>Alex</td>
</tr>
</tbody>
</table>

如果我使用$("#myTbale").tablesorter();,我如何使用tablesorter 2.0对此进行排序它只对单个 tbody 进行排序。

最佳答案

我有一个fork of tablesorter这将分别对每个 tbody 进行排序。如果您不想对 tbody 进行排序,请添加 cssInfoBlock option 中包含的类名。 - 默认为tablesorter-infoOnly

<tbody class="tablesorter-infoOnly">
<tr>
<th>The contents of this tbody</th>
</tr>
<tr>
<td>will not be sorted</td>
</tr>
</tbody>

关于jquery - 在 jquery table sorter 2.0 中对具有多个 <tbody> 的表进行排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17699181/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com