How*_*Gee 13 javascript jquery tablesorter properties options
我想从过滤中排除某些列 - 就像我可以使用sorder但我不确定如何使用小部件,是否有一种简单的方法可以做到这一点?
jQuery(document).ready(function($) {
$("#eventTable").tablesorter({
widthFixed : true,
widgets: ["filter"],
widgetOptions : {
filter_childRows : false,
filter_hideFilters : false,
filter_ignoreCase : true,
filter_cssFilter : 'tablesorter-filter',
filter_functions : {
1 : function(e, n, f, i) {
return e === f;
}
}
}
});
});
Run Code Online (Sandbox Code Playgroud)
lin*_*don 22
您可以使用标题选项或将"filter-false"类添加到该列的TH标记.
tablesorter文档中记录了header选项- 单击配置表的属性列中的"headers".该选项的语法是:
headers: { 0: { filter: false} }
如果您不想显示默认的禁用过滤器格式,请使用以下CSS:
.tablesorter thead .disabled {display: none}
Ser*_*lto 14
您可以使用以下命令禁用特定列的过滤器和/或排序:
<th data-sorter="false" data-filter="false"></th>
Run Code Online (Sandbox Code Playgroud)
小智 5
禁用特定列使用的筛选器 <th data-filter="false"></th>
禁用特定列使用的排序 <th data-sorter="false"></th>
将它们组合起来禁用它们. <th data-sorter="false" data-filter="false"></th>
这将导致类"禁用"将应用于用于过滤的文本框.文本框将显示为灰色.如果你想完全隐藏文本框,只需添加它
<style>
.tablesorter thead .disabled {
display:none;
}
</style>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13583 次 |
| 最近记录: |