How can I remove the search bar and footer added by the jQuery DataTables plugin?
For DataTables >=1.10, use:
$('table').dataTable({searching: false, paging: false, info: false});
For DataTables <1.10, use:
$('table').dataTable({bFilter: false, bInfo: false});
or using pure CSS:
.dataTables_filter, .dataTables_info { display: none; }
Check out http://www.datatables.net/examples/basic_init/filter_only.html for a list of features to show/hide.
What you want is to set "bFilter" and "bInfo" to false;
$(document).ready(function() {
$('#example').dataTable( {
"bPaginate": false,
"bFilter": false,
"bInfo": false
} );
} );
You can also not draw the header or footer at all by setting sDom
: http://datatables.net/usage/options#sDom
'sDom': 't'
will display JUST the table, no headers or footers or anything.
It's discussed some here: http://www.datatables.net/forums/discussion/2722/how-to-hide-empty-header-and-footer/p1