I\'m trying to filter a table from an alphabetical input with jQuery.
I have first and last names in two columns of the table, and I\'d like
If the id of your table is sel, and the table is tab, this will do the trick. Change eq(0) to change the column to look in. An empty value in the select box will re-show all trs.
var selSelection = $("#sel").val();
if(!selSelection) $("#tab tr").show();
else $("#tab tr").show().filter(function(index){
return $("td:eq(0)", this).html().indexOf(selSelection) == -1;
}).hide();