This time I have a problem with jQuery filtering.
$( document ).ready(function() {
$('#search').keyup(function() {
var s = new RegExp(this.value);
$('#support-tasks-table tbody tr').each(function() {
if(s.test(this.cells[8].innerHTML))
$(this).show();
else $(this).hide();
});
});
$('select#sel-supporttask-projects').change(function() {
var s = new RegExp(this.value);
$('#support-tasks-table tbody tr').each(function() {
if(s.test(this.cells[3].innerHTML)) $(this).show();
else $(this).hide();
});
});
})
Each of this functions hides or shows table tr's by cell value and it's working fine. But when I set something on search, and after that I choose the option from select, it ignores that tr's are hidden and searching from all tr's in a table. Is there any easy way to change this code to search only by showed tr's?