【发布时间】:2013-08-13 15:14:23
【问题描述】:
我正在使用 Tablesorter Filter 过滤多列表中的结果。目前,每列都有自己的过滤器搜索框,您可以在demo 中看到它。我想知道的是,是否有可能只有一个过滤器搜索框来过滤每一列,就像 DataTables 插件中可能的那样(见here)?
【问题讨论】:
标签: jquery filter tablesorter
我正在使用 Tablesorter Filter 过滤多列表中的结果。目前,每列都有自己的过滤器搜索框,您可以在demo 中看到它。我想知道的是,是否有可能只有一个过滤器搜索框来过滤每一列,就像 DataTables 插件中可能的那样(见here)?
【问题讨论】:
标签: jquery filter tablesorter
将此quicksearch plugin 与tablesorter 一起使用。它应该初始化如下:
$('#search').quicksearch('table tbody tr');
如果您需要将它与寻呼机插件一起使用,那么您将需要以下初始化代码:
$('#search').quicksearch('table tbody tr', {
delay: 500,
show: function () {
$(this).removeClass('filtered');
$table.trigger('pageSet'); // reset to page 1 & update display
},
hide: function () {
$(this).hide().addClass('filtered');
$table.trigger('pageSet'); // reset to page 1 & update display
},
onAfter: function () {
// no need to update the table, just the pager, so use its namespace
$table.trigger('update.pager');
}
});
有一天我会将它构建到一个小部件中,但同时注意this issue thread中的更新。
【讨论】: