我使用"jquery.tablesorter.widgets.js“的表格过滤器工作良好,但我必须显示”没有发现的数据“时,记录无法根据搜索标准。我桌子上没有用任何传呼机。我已经检查了这个链接带空数据的TableFilter插件,但无法解决我的问题。
发布于 2015-12-29 17:46:53
如果没有寻呼机,您需要自己创建消息行(演示):
CSS
tr.noData td {
background: #eee;
color: #900;
text-align: center;
}JS
$('table').on('filterEnd filterReset', function() {
var c = this.config,
fr = c.filteredRows;
if (fr === 0) {
c.$table.append([
// "remove-me" class added to rows that are not to be included
// in the cache when updating
'<tr class="noData remove-me" role="alert" aria-live="assertive">',
'<td colspan="' + c.columns + '">No Data Found</td>',
'</tr>'
].join(''));
} else {
c.$table.find('.noData').remove();
}
});https://stackoverflow.com/questions/34505689
复制相似问题