Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change "Show X entries" text for page length option

I need to remove the text "show" and "entries" from a DataTable plugin via jQuery. I am using the CDN so I can not edit the raw code.

<div class="dataTables_length" id="example_length">
    <label>
       Show
          <select name="example_length" aria-controls="example" class="">
       entries
    </label>
</div>
like image 884
diogenes Avatar asked Jan 29 '26 13:01

diogenes


1 Answers

Use language.lengthMenu option.

For example:

$('#example').DataTable({
   "language": {
      "lengthMenu": "_MENU_"
   }
});
like image 125
Gyrocode.com Avatar answered Feb 01 '26 03:02

Gyrocode.com



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!