I have a table updated by Ajax and I receive different values in some cells. I want to do an accountant if some values match. I have a function that does it but the counter does not show the new value until I refresh the entire page. What I can do? I appreciate your help and time guys.
This is my function:
var consCount = 0;
$(function() {
$("#pizarra #trPizarra").each(function(){
var estado = $(this).find('#tdEdo').text();
var asunto = $(this).find('#tdImg').text();
var juntos = estado + asunto;
if(juntos === "listo" + "0" || juntos === "listo" + "4"){ ++consCount; }
});
setInterval(function(){
$('#count-consulta-span').load(document.URL + ' #count-consulta-span',function(){
$('#count-consulta-span').text(consCount);
});
},3500);
});