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 wan
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
if you are using themeroller:
.dataTables_wrapper .fg-toolbar { display: none; }
Here you can add to sDom
element to your code, top search bar is hidden.
$(document).ready(function() {
$('#example').dataTable( {
"sDom": '<"top">rt<"bottom"flp><"clear">'
} );
} );
If you only want to hide the search form for example because you have column input filters or may be because you already have a CMS search form able to return results from the table then all you have to do is inspect the form and get its id - (at the time of writing this, it looks as such[tableid]-table_filter.dataTables_filter
). Then simply do [tableid]-table_filter.dataTables_filter{display:none;}
retaining all other features of datatables.
You can use sDom attribute. Code looks something like this.
$(document).ready(function() {
$('#example').dataTable( {
'sDom': '"top"i'
} );
} );
İt hides search and pager box.
A quick and dirty way is to find out the class of the footer and hide it using jQuery or CSS:
$(".dataTables_info").hide();