I made a table where on the labels
I can write numbers (to multiply them) and in another to show the result, it works only when I have a row
But if I add another row with its columns below, it does not show the result for each row
If you notice 14 * 13 = 182 and 13 * 2 = 26 It only shows me the result of the last operation
I would like you to help me to show the correct result of each multiplication in the result column, here I leave my code, thanks in advance and I hope it was clear since I am not good at explaining
HTML
<table width="600" border="1" cellspacing="0" cellpadding="7">
<tr class="tabla">
<td >numero 1</td>
<td >numero 2</td>
<td>resultado</td>
</tr>
<tr class="tabla">
<td id="" onkeyup="myFunction()" contenteditable></td>
<td id="" onkeyup="myFunction()" contenteditable></td>
<td class="total"></td>
</tr>
<tr class="tabla">
<td id="" onkeyup="myFunction()" contenteditable></td>
<td id="" onkeyup="myFunction()" contenteditable></td>
<td class="total"></td>
</tr>
</table>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
function myFunction() {
$('.tabla').each(function() {
var _1 = $(this).find("td").eq(0).html();
var _2 = $(this).find("td").eq(1).html();
var _11=parseInt(_1);
var _22=parseInt(_2);
var total= _11 * _22 ;
if( isNaN(total)){
$('.total').html(0) ;
}else{
$('.total').html(total) ;
}
});
}
</script>