I am using the following jQuery code for table calculations….
$(document).ready(function() {
var totalregfee = 0;
$('.reg_fee').each(function(){
totalregfee+= parseFloat($(this).html());
});
$('.total_regfee').html(totalregfee);
});
It works perfect when the page loads, but if I go to the next page or increase the data rows on page using tablesorter.pager, total doesn’t get updated. How can I use jQuery .live() on the above code?
Please ask if you need more details, thanks for support.
You should make a function
Then call it on document ready and whenever you need to uopdate the total
To use it with tablesorter you should bind it to sortend (this works when you sort the table)