I have implemented a table filter with jQuery, as per the code below, but I would like to implement a register return counter as I search.
$(function(){
$(".input-search").keyup(function(){
//pega o css da tabela
var tabela = $(this).attr('alt');
if( $(this).val() != ""){
// OCULTA VALORES NÃO ENCONTRADOS.
$("."+tabela+" tbody>tr").hide();
// EXIBE OS RESULTADOS ENCONTRADOS.
$("."+tabela+" td:contains-ci('" + $(this).val() + "')").parent("tr").show();
} else{
//EXIBE TABELA TODA
$("."+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;
}
});