[英]reinitialize quicksearch on a table?
I am using jQuery quickSearch to search multiple tables on a single page (one for each). 我正在使用jQuery quickSearch在单个页面上搜索多个表(每个表一个)。 The problem is some of the data can dynamically change in some of the table fields.
问题是某些表字段中的某些数据可以动态更改。 I want quick search to work with that but it doesn't.
我想要快速搜索来解决这个问题,但事实并非如此。 Any help?
有什么帮助吗?
Just got a solution 刚找到解决方案
add a "recache" option in the quicksearch plugin and do this in the end of the quicksearch plugin file: 在quicksearch插件中添加“重新缓存”选项,并在quicksearch插件文件的末尾执行此操作:
if( options.recache != null && typeof options.recache == 'function' ) {
//alert('binding'); $(this).bind('recacheQs',e.cache); }if( options.recache != null && typeof options.recache == 'function' ) {
now whenever the data changes just do this
//alert('binding'); $(this).bind('recacheQs',e.cache); }$(your table).trigger('recacheQs');
if( options.recache != null && typeof options.recache == 'function' ) {
现在每当数据变化只是这样做
//alert('binding'); $(this).bind('recacheQs',e.cache); }$(your table).trigger('recacheQs');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.