How can I remove the search bar and footer added by the jQuery DataTables plugin?

leora picture leora · Dec 17, 2009 · Viewed 332.4k times · Source

I am using jQuery DataTables.

I want to remove the search bar and footer (showing how many rows there are visible) that is added to the table by default. I just want to use this plugin for sorting, basically. Can this be done?

Answer

antpaw picture antpaw · Dec 17, 2009

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; }