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

前端 未结 19 2608
孤街浪徒
孤街浪徒 2020-12-07 07:45

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

19条回答
  •  离开以前
    2020-12-07 08:03

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

提交回复
热议问题