显示使用tablesorter搜索小部件找不到记录

我正在使用“jquery.tablesorter.widgets.js”来使表filter工作正常,但是当基于搜索条件的记录不可用时,我必须显示“No Data Found”。 我在桌子上没有使用任何寻呼机。 我已检查此链接TableFilter插件与Null数据但无法解决我的问题。

如果没有寻呼机,您需要自己创建一个消息行( 演示 ):

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 '', 'No Data Found', '' ].join('')); } else { c.$table.find('.noData').remove(); } });