I have this table, structured in this way:
Html part:
<table id="table_div" class="table table-striped table-condensed"><tbody></tbody></table>
JS part:
var data = json_response['data'];
$("#table_div").html('<thead><tr><td>TIMESTAMP</td><td>VALUE</td></tr></thead>');
$.each(data, function(index, value) {
$('#table_div > tbody:last').append('<tr><td>' + value + '<td></tr>');
});
This code generates me a table in the style of twitter bootstrap. Now I would like that the table slide up and down or is formed from more and more pages.
I don’t know if I can use and in that way the accordion tool of twitter bootstrap. Or any other script. Can you help me?
EDIT
The data variable is in this type:
var data = [[1348754599, 0.0], [1348754639, 0.0], [1348754680, 0.0], [1348754721, 0.0], [1348754761, 0.0], [1348754802, 0.0], [1348754842, 0.0], [1348754883, 0.0], [1348754924, 0.0], [1348754964, 0.0], [1348755005, 0.0], [1348755045, 0.0], [1348755086, 0.0], [1348755126, 0.0], [1348755167, 0.0], [1348755208, 0.0]];
Can you setup a fiddle for this, to clarify what you need?
Update: Some corrections had to be made to the original fiddle, and the example uses the tablesorter jQuery plugin. Here is the revised HTML to make it work:
and revised JavaScript:
Here is a fiddle with a working example: http://jsfiddle.net/jkvr8/41/