Ir para conteúdo

leandro.silva

Members
  • Total de itens

    1
  • Registro em

  • Última visita

Tudo que leandro.silva postou

  1. leandro.silva

    Filtro e totais em uma Jquery

    Estou tentando fundir essas funções para receber o total levando em consideração os filtro. Segue. FILTRO. $(function(){ $("#tabledit input").keyup(function(){ var index = $(this).parent().index(); var nth = "#tabledit td:nth-child("+(index+1).toString()+")"; var valor = $(this).val().toUpperCase(); $("#tabledit tbody tr").show(); $(nth).each(function(){ if($(this).text().toUpperCase().indexOf(valor) < 0){ $(this).parent().hide(); } }); }); $("#tabledit input").blur(function(){ $(this).val(""); }); TOTAL. $(function(){ var valorCalculado = 0; $( ".valor-calculado" ).each(function() { valorCalculado += parseInt($( this ).text()); }); $( "#qtdtotal" ).text(valorCalculado); });
×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.