I have jquery datatable and I want to calculate sum of two columns. initialization of the table
$('#myTable').DataTable({
autoWidth: false,
searching: false,
...
initComplete: function (settings, json) {
// calculate sum and inject into second and third row in the footer
});
});
<table id="myTable">
<thead>
<tr>
<th>Id</th>
<th>Time one</th>
<th>Time two</th>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
</table>
Update:
vales inside this columns are like:
=====================
| 1 | 01:15 | 10:00 |
=====================
| 9 | 11:44 | 0:120
|