In responsive mode, how can I show only one square that changes in the pagination?

In responsive mode, how can I show only one square that changes in the pagination?

McfigueMcfigue Posts: 3Questions: 1Answers: 0

page 1:
previous <1> next

page 2:
previous<2>next

final page:
previus<9> next

that only show a page in the middle part, only a pagination box

Answers

  • rf1234rf1234 Posts: 3,000Questions: 87Answers: 421

    Why only in responsive mode? What do you mean?

    If you want to see only the active page in one square just hide the rest using CSS.

    The appropriate events would be "init" or "draw". Just give it a try.

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin

    Do you mean the Pagination control itself should be more responsive? If so, yes I agree. That is something that most certainly needs to be addressed.

    Allan

  • McfigueMcfigue Posts: 3Questions: 1Answers: 0
    edited November 2022

    Resolution :

    1)put the plugin link

    <script src="//cdn.datatables.net/plug-ins/1.12.1/pagination/simple_numbers_no_ellipses.js"></script>
    

    2)paste script

    <script>
    $.fn.DataTable.ext.pager.numbers_length = 1;
    </script>
    

    3)paste inside the characteristics of the data table function

     "pagingType": "simple_numbers_no_ellipses",
    

    Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

  • McfigueMcfigue Posts: 3Questions: 1Answers: 0

    Resolution :

    1)put the plugin link

    ">" href="#--">

    2)paste script

    $.fn.DataTable.ext.pager.numbers_length = 1;

    3)paste inside the characteristics of the data table function
    "pagingType": "simple_numbers_no_ellipses",

Sign In or Register to comment.