datatables.js show hide columns code example
Example 1: datatables dynamically hide columns
const table = $('#example').DataTable();
const column = table.column( 2 );
column.visible( ! column.visible() );
Example 2: datatables hide showing entries
$('#example').dataTable({
bInfo : false
});
$('#example').DataTable({
info : false
});
Example 3: datatable hide no data available in table
var someTableDT = $("#some-table").on("draw.dt", function () {
$(this).find(".dataTables_empty").parents('tbody').empty();
}).DataTable();