riklomas / quicksearch

A jQuery plugin for searching through tables, lists, etc quickly
http://www.lomalogue.com/jquery/quicksearch/
680 stars 261 forks source link

Search input values also #19

Open kasp3r opened 13 years ago

kasp3r commented 13 years ago

If you have inputs in your table and you want to search by input value, you can do that by changing "strip_html" function.

replace function with this:

this.strip_html = function (input) { var output = input.replace(new RegExp('<input.value="(.?)".*>', 'gi'), "$1").replace(new RegExp('<[^<]+>', 'g'), ""); output = $.trim(output.toLowerCase()); return output; };

Added:

.replace(new RegExp('<input.value="(.?)".*>', 'gi'), "$1")