The following is data in array (id,num1,num2,qty).
1,500,1000,1
2,700,1200,1
3,900,1400,1
How do I sum and display the following data?
500 + 700 + 900
1000 + 1200 + 1400
Result 2100 3600
This is what I have so far...
var allItems = [];
function calcWattage() {
allItems = [];
$(".cbx").each(function(){
if($(this).is(":checked"))
allItems.push(this.id + "," + ($(this).val()) + "<br />");
});
$("#result").html(allItems.join(""));
}