Different page number links in desktop and mobile view?

Different page number links in desktop and mobile view?

asleasle Posts: 96Questions: 28Answers: 0

I want to display only 3 pagination links in mobile view but standard number of page number links in desktop view. My table is using responsive. I cah set standard page numbers with this code. But how can I set a page.numbers_length depending on the view?

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

How can I set this value only in mobile view? I don't want to hide them, just show fewer page number links.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Answer ✓

    At the moment you can't I'm afraid. I agree though, the paging component needs to be more responsive. It is something that is on the cards for a feature release.

    Allan

  • mnbob70mnbob70 Posts: 23Questions: 2Answers: 0

    Assuming $.fn.DataTable.ext.pager.numbers_length is applied globally to all DataTables, is there a way to assign different numbers_length values to individual tables?

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    No - not at this time. It is something I'd like to do in future, but it isn't available yet.

    Allan

Sign In or Register to comment.