简体   繁体   中英

How to restrict page number options in Bootstrap 4 DataTables pagination

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

Currently, it's showing like this:

在此处输入图像描述

But I want to show it like this:

在此处输入图像描述

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM