I need to dynamically populate a table footer from a JSON data source. Here is the struture of the table
<table id="example_table">
<tfoot id="example_footer">
<tr id="example-footer" style="font-weight:bold">
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
</table>
I m planning to use the append() in jQuery as in the below fashion
$('#example_footer').append( '<tr>...</tr>' );
can anyone tell me how to access the tfooter and assign value form a js variable as it’s content
It actually depends upon how your JSON is structured. Assuming that it is received in the variable ‘data’ and it has say 5 elements, the javascript would be somewhat like: