jQuery Tablesorter - 禁用排序和过滤

标签 jquery filter tablesorter

我从 http://mottie.github.com/tablesorter/docs/example-options-headers.html 获得此代码:

// BONUS TIP: disable a column using jQuery data directly
// but do it before the table initializes
$("table thead th:eq(5)").data("sorter", false);

这有效,我可以添加第二行,如下所示以禁用过滤。但是,我想将它们合并为一行。我该怎么做?

// I Want to combine this into the prev line   
$("table thead th:eq(5)").data("filter", false); 

最佳答案

完全未经测试,但试试这个

$("table thead th:eq(5), table thead th:eq(7)").data("sorter", false).data("filter", false);

关于jQuery Tablesorter - 禁用排序和过滤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15580617/

相关文章:

javascript - 如何在整个页面上覆盖 jQuery UI 对话框?

typescript - 如何使用一个可观察对象的输出来过滤另一个

arrays - Swift 中的数组操作和重新排序

javascript - 文本选择和冒泡

jquery - 添加背景图片和边框图片到表单中

javascript - 为什么有些 JavaScript 开发人员使用 setTimeout 为一毫秒?

jquery - 具有自定义按钮文本和多列的外部过滤器

php - jQuery Tablesorter 不适用于使用 php 生成的表

javascript - fullcalendar 记住用户选项,例如。 cookie 中的月/周/日

javascript - 从数组中删除未定义的值