How do I to hide jQuery datatables, when I want to toggle the datatable's visibility? The problem is if I write hide statement it only hides the rows, not the headers and footer. How can I hide datatable fully?
For hiding, I used the below code:
var oTable = $('#example').dataTable(); // 'example is the table id'
oTable.hide();
Try this
$('#example').parents('div.dataTables_wrapper').first().hide();