Add custom text and/or fields to table info
Add custom text and/or fields to table info
Case in point:
I have some memcached data I want to present in a table.
Took care of passing last_updated and time_to_live.
[code]
$.getJSON("ranks.php", query_args, function(json) {
$("#points").dataTable( {
...........................................................................
last_updated: json.last_updated,
time_to_live: json.time_to_live
} );
[/code]
Is there a way to put this info in the table (not in a field, in a header/footer)?
I have some memcached data I want to present in a table.
Took care of passing last_updated and time_to_live.
[code]
$.getJSON("ranks.php", query_args, function(json) {
$("#points").dataTable( {
...........................................................................
last_updated: json.last_updated,
time_to_live: json.time_to_live
} );
[/code]
Is there a way to put this info in the table (not in a field, in a header/footer)?
This discussion has been closed.
Replies
[code]
$('#points tfoot>tr td:eq(0)').html( json.last_updated );
[/code]
For example.
Allan
Worked fine, once I added a tfoot (is there a way to add one using jQuery?)
Gerardo
Allan
[code]
/*
* Final init
* Sanity check that there is a thead and tfoot. If not let's just create them
*/
[/code]
thead and tbody are created if not existant, but tfoot is not. Maybe you meant tbody instead?
Thanks,
Gerardo
Allan