nickL
nickL

Reputation: 1576

How to hide "Showing 1 of N Entries" with the dataTables.js library

How do you remove the "Showing 1 of N entries" line of text on a dataTable (that is when using the javascript library dataTables? I think I was looking for something along these lines...

 $('#example').dataTable({
      "showNEntries" : false
       });

Pretty sure this is a simple one, but cannot seem to find it in the docs.

Upvotes: 134

Views: 183525

Answers (5)

Arian Acosta
Arian Acosta

Reputation: 6817

If you also need to disable the drop-down (not to hide the text) then set the lengthChange option to false

$('#datatable').dataTable( {
  "lengthChange": false
} );

Works for DataTables 1.10+

Read more in the official documentation

Upvotes: 13

Saulius
Saulius

Reputation: 1

It is Work for me:

language:{"infoEmpty": "No records available",}

Upvotes: 0

mamal
mamal

Reputation: 1986

try this for hide

$('#table_id').DataTable({
  "info": false
});

and try this for change label

$('#table_id').DataTable({
 "oLanguage": {
               "sInfo" : "Showing _START_ to _END_ of _TOTAL_ entries",// text you want show for info section
            },

});

Upvotes: 25

Irf
Irf

Reputation: 4617

Now, this seems to work:

$('#example').DataTable({
  "info": false
});

it hides that div, altogether

Upvotes: 6

BMH
BMH

Reputation: 4340

You can remove it with the bInfo option (http://datatables.net/usage/features#bInfo)

   $('#example').dataTable({
       "bInfo" : false
   });

Update: Since Datatables 1.10.* this option can be used as info, bInfo still works in current nightly build (1.10.10).

Upvotes: 333

Related Questions