I want to add a custom argument to footerCallback
in jQuery dataTables.
This is some part of my code :
oTableClient = $('#tbl_client').DataTable({
"footerCallback": function(){
dataTableFooterCallback('client');
}
});
function dataTableFooterCallback(type, row, data, start, end, display) {
var api = this.api(), data;
if (type == 'client') {
data = api.column(6, {page: 'current'}).data();
} else {
data = api.column(5, {page: 'current'}).data();
}
}
But getting an error,
TypeError: this.api is not a function
var api = this.api(), data;
Where am I wrong?