Displaying the sum of the data in my table footer. I want table footer hide when sum is zero or null. but table footer display when sum is not zero or not null.
How to solve this from jquery.
<table id="myTable">
<thead>
<tr>
<th>
Product
</th>
<th>
Value
</th>
</tr>
</thead>
<tbody>
<tr>
<td>Pro1</td>
<td>50</td>
</tr>
<tr>
<td>Pro2</td>
<td>40</td>
</tr>
<tr>
<td>Pro2</td>
<td>60</td>
</tr>
<tr>
<td>Pro3</td>
<td>60</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Total</td>
<td class="total-sum">210</td>
</tr>
</tfoot>
</table>
5