我用过 this table sorter plugin .现在,我必须在 <thead>
中使用多个 header .我只希望一行保持事件状态以进行排序。如果没有该行,我希望其他行的标题被禁用以进行排序。我该怎么做? Here is my fiddle有没有办法像这样通过 css 类禁用一个 header ?
<thead>
<tr>
<th class="sorter-false">Info</th>
<th class="sorter-false">Info</th>
<th class="sorter-false">Info</th>
<th class="sorter-false" colspan="2">Text</th>
</tr>
<tr>
<th>Last Name</th>
<th>First Name</th>
<th>Email</th>
<th>Due</th>
<th>Web Site</th>
</tr>
</thead>
最佳答案
您可以将参数添加到表格排序器插件:
$("#myTable").tablesorter({
theme: 'blue',
selectorHeaders: '.sorter-true'
});
关于jquery - 如何在 jQuery 表格排序器中禁用多个标题中的一个标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25511631/