我将 jquery 插件 tablesorter 与粘性标题小部件一起使用。 在文档中指出添加了一个名为 sticky-false 的类。 但我无法设法隐藏特定列上的粘性标题。
我没有在我的 javascript 上设置任何选项,我像这样启动 tablesorter。 ... 作品。
$('#table').tablesorter({widgets: ['zebra','stickyHeaders', 'filter'] }
然后在我的 table 上添加以下内容,...sticky-false 不起作用,其他两个起作用但输入框不会消失
<th class="sticky-false filter-false sorter-false">Table</th>
我正在使用 TableSorter 2.14.5 和 tableSorter 2.8+ 小部件
谁知道隐藏输入框的方法?
最佳答案
“sticky-false”类适用于整行,而不是单个列。
<tr class="sticky-false">
<th class="sorter-false" colspan="5">This row will not be sticky</th>
</tr>
<tr>
<th class="filter-false sorter-false">Column 1</th>
...
<th>Column 5</th>
</tr>
如果要隐藏列过滤器,请使用以下 css:
.tablesorter-filter-row .disabled { display: none; }
关于javascript - jquery tablesorter 类 sticky-false,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21437470/