I'm trying to add records that's come from Ajax as respond. My codes are the following;
Ps: I can see ajax response with alert
command properly.
Html codes
<table id="seller-table" class="table" data-filter="#filter" data-page-size="5">
<thead>
<tr>
<th data-toggle="true">ID</th>
<th>Date</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
Data as json
var data = [{"id": 10, "date": "Mon Aug 04 2014 17:00:00"},
{"id": 11, "date": "Tue Aug 05 2014 17:00:00"},
{"id": 12, "date": "Wed Aug 06 2014 17:00:00"}];
jQuery codes
$.ajax({
url : '/bid/find/',
data: { },
success : function(data) {
$('table tbody').append(data);
$('table').trigger('footable_redraw');
},
error : function(xhr, statusText, error) {
alert("Error! Could not retrieve the data.");
}
});