开发者

jQuery / Ajax search by particular field

I have it all setup and working fine - what id like to do is have it only search by one particular field in a table (td with class of test).

Im using $('input#SearchBox').quicksearch('table#tablesorter-demo tbody tr');

which searches all the fields in the table, I have tried:

$('input#SearchBox').quicksearch('开发者_开发百科table#tablesorter-demo tbody tr td.test');

but this just stops the whole search from working, ideas appreciated?


Try this:

$('input#SearchBox').quicksearch('table#tablesorter-demo tbody tr', {'selector': 'td.test'})

Working JSFiddle Example


Try being less specific in your criteria:

$('input#SearchBox').quicksearch('.test');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜