Topic: Datatables style pagination

Leo free asked 4 years ago


How to change the texts of the bottom pagination per button arrow same of examples.

You speak on your website datatable2 ...

But into my zip download no this version. It's for that ?

My Actual resultActual Result

I would like this styleSame : https://mdbootstrap.com/docs/jquery/tables/datatables/#pagination-full-numbersMy wish

And how change the language on the automatic elementEx : Showing 1 to 10 of 57 entries**Ex : *Show entries*Ex : **First, Previous, Next, , Last


Mateusz Łubianka staff answered 4 years ago


Hi @Leo,

Use this code and add your text:

$(document).ready(function () {
      $('#dtBasicExample').DataTable({
        "oLanguage": {
          "sLengthMenu": "Your _MENU_ text",
        }
      });
      $('.dataTables_length').addClass('bs-select');
    });

Best,


Mateusz Łubianka staff answered 4 years ago


Hi @Leo,

The new version of Datatables is available from MDB 4.16.0. Which MDB version are you using?

The next step is importing Datatables2 css and js:

    <!-- MDBootstrap Datatables  -->
  <link href="css/addons/datatables2.min.css" rel="stylesheet">

     <!-- MDBootstrap Datatables  -->
  <script type="text/javascript" src="js/addons/datatables2.min.js"></script>

After that:

<script type="text/javascript">
    $(document).ready(function () {
  //Pagination full Numbers
  $('#paginationFullNumbers').DataTable({
    "pagingType": "full_numbers"
  });
});
  </script>

Best,


Leo free commented 4 years ago

Thanks is ok now i used 4.15 ;) But and for my last questions at the level : How translations static text ? - Show entries - of



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.15.0
  • Device: Imac 27\\
  • Browser: Chrome
  • OS: Max OS Catalina
  • Provided sample code: No
  • Provided link: Yes
Tags