如何删除由jQuery DataTables插件添加的搜索栏和页脚? [英] How can I remove the search bar and footer added by the jQuery DataTables plugin?
本文介绍了如何删除由jQuery DataTables插件添加的搜索栏和页脚?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 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?
推荐答案
使用DataTables构造函数:
Using the DataTables constructor:
$('table').dataTable({bFilter: false, bInfo: false});
或使用纯CSS:
.dataTables_filter, .dataTables_info { display: none; }
对于DataTable 1.10,使用:
For DataTables 1.10, use:
$('table').dataTable({searching: false, paging: false});
这篇关于如何删除由jQuery DataTables插件添加的搜索栏和页脚?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文