I need to search for a value, but I have a problem, I have to search in 3 different tables to find, and when I find I should direct the focus to the DIV where the table is. I can do this search with a table quietly, but with 3 tables in 3 different divs I can not! Does anyone know a way to accomplish this search? Thank you.
Here is an image of my scenario, every tab
has a table inside with the values. I would need to fetch the value and speak in which table and div and also evidence that value.
$(function(){$(".input-search").keyup(function(){
//pega o css da tabela
var tabela = $(this).attr('alt');
if( $(this).val() != ""){
$("."+tabela+" tbody>tr").hide();
$("."+tabela+" td:contains-ci('" + $(this).val() +"')").parent("tr").show();
} else{
$("."+tabela+" tbody>tr").show();
}
});
});
$.extend($.expr[":"], {
"contains-ci": function(elem, i, match, array) {
return (elem.textContent || elem.innerText || $(elem).text() || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
}
});