JQuery: Multiplication of data by position in a table

0

here again with jquery themes, Result to obtain; that the calculation by quantity is multiplied by the price, updating the total, as well as qualifying the subtotal, igv and total global.

The most curious thing is to achieve it based on positions, because the ranks I bring it by ajax.

Function that is activated with onkeyup that I was doing, but that still does not work well.

function calculaTotalProducto(){

$('#tabla_det_ingreso tr').each(function() {

var valor_precio = $(this).find("td").eq(1).text();   

var valor_cantiddad =  $(this).find("td").eq(2).text(); 

console.log($(this).find("td").eq(1).text());
console.log($(this).find("td").eq(2).text());

totalP = valor_precio * valor_cantiddad

alert(totalP);

});

waiting for your help! you vibrate!

    
asked by JBAL27 13.07.2018 в 04:34
source

0 answers