I solved the issue by doing the following :
( function($) {
var pounter = 1;
$(document).ready(function(){
var qounter = 1;
var trounter = 1;
//Count each instance and add number to Name
$row.find('._ext_price_total_html').each(function() {
$(this).attr({
'name': function(_, name) {
return name + pounter },
});
pounter++;
})
$row.find('.quantitys').each(function() {
$(this).attr({
'name': function(_, name) {
return name + qounter },
});
qounter++;
})
$('#quantity', function(){
var Tsum = 0;
$('[id^="_ext_price_total_html"]').each(function() {
if(!isNaN(this.value) && this.value.length!=0) {
Tsum += parseFloat(this.value);
}
$('.toTally').val(Tsum.toFixed(2))
})
})
$('#quantity').change(function(){
var Tsum = 0;
$('[id^="_ext_price_total_html"]').each(function() {
if(!isNaN(this.value) && this.value.length!=0) {
Tsum += parseFloat(this.value);
}
$('.toTally').val(Tsum.toFixed(2))
})
})
$('#quantity').keyup(function(){
var Tsum = 0;
$('[id^="_ext_price_total_html"]').each(function() {
if(!isNaN(this.value) && this.value.length!=0) {
Tsum += parseFloat(this.value);
}
$('.toTally').val(Tsum.toFixed(2))
})
})
//adjust/subtract from total when removeing row
$('#deleteRow').live('click',function(){
var delAsk = confirm('Remove this item?');
if (delAsk)
{
$(this).parents('.jshop_prod_cart').remove();
var Tsum = 0;
$('[id^="_ext_price_total_html"]').each(function() {
if(!isNaN(this.value) && this.value.length!=0) {
Tsum += parseFloat(this.value);
}
$('.toTally').val(Tsum.toFixed(2))
})
}
else
{
('cancel');
}
});