Generate datatable: it should be dataTable

$(document).ready(function() {
$('.tbl').dataTable( {
"order": [[ 0, "desc" ]],
"iDisplayLength": 25
} );
var oTable;
oTable = $('.tbl').dataTable();
$('#bp-modules').change( function() {
oTable.fnFilter( $(this).val() );
});
});

Delet row: for delete it should be DataTable()

var table = $('.tbl').DataTable();

table
.row( $('.att-'+att_id) )
.remove()
.draw();

Advertisements