How to restrict page number options in Bootstrap 4 DataTables pagination

Viewed 32

I want to restrict page number options in the Bootstrap Data Tables Pagination option.

Currently, it's showing like this:

enter image description here

But I want to show it like this:

enter image description here

1 Answers

You can use $.fn.DataTable.ext.pager.numbers_length = 5; where 5 is number of displayed buttons (next, prev, 1,2 and 3)

live example link

Related