Get table total

modbride

New Member
I have a html table as the following, I also have an option to add rows dynamically.\[code\] <tbody> <tr style="display: none" id="invoiceRow"> <td><textarea></textarea></td> <td class="va_middle"><input type="text" name="quantity" class="mini" /></td> <td class="va_middle"><input type="text" name="rate" class="mini" /></td> <td class="va_middle"><input type="text" name="amount" class="mini" /></td> <td> <a onclick="deleteInvoiceRow(this);" class="btn btn-small"> <i class="icon-remove"></i> </a> </td> </tr> <tr> <td><textarea></textarea></td> <td class="va_middle"><input type="text" name="quantity" class="mini" /></td> <td class="va_middle"><input type="text" name="rate" class="mini" /></td> <td class="va_middle"><input type="text" name="amount" class="mini" /></td> <td> <a onclick="deleteInvoiceRow(this);" class="btn btn-small"> <i class="icon-remove"></i> </a> </td> </tr> <tr> <td colspan="2"><a onclick="addNewInvoiceRow();"><i class="icon-plus-sign right"></i></a></td> <td class="va_middle" colspan="3">&nbsp; <strong>Total: &nbsp; &nbsp;</strong><input type="text" name="rate" class="total" /></td> </tr> </tbody>\[/code\]I would like to get the total of each row and update it to the total field in the last tr.How do I do it with jQuery? and update the value on change of the value.
 
Back
Top