Reduce number of page numbers (from 7) to current page, next page, and previous page only
Reduce number of page numbers (from 7) to current page, next page, and previous page only
Azima1993
Posts: 5Questions: 3Answers: 0
I need to reduce number of page numbers (max 7) to only current ( say 4), next page (say 5), and previous page(say 3), with previous and next buttons intact. How can I do that?
This discussion has been closed.
Answers
should do it.
Allan
If you don't want the numbers at all, use the
full
option of thepagingType
option.Allan
@allan
$('#requestTable').DataTable({
"bPaginate": true,
"bLengthChange": true,
"bFilter": true,
"bSort": false,
"bInfo": true,
"order": [[1, 'desc']],
"aLengthMenu": [10, 20, 30],
'iDisplayLength': 5,
"bAutoWidth": false,
// "pagingType": "full",
stateSave: true
});
$.fn.DataTable.ext.pager.numbers_length = 5;
This is how I tried, but it is not working. How should I put it?
Put the static setting before you initialise the DataTable: http://live.datatables.net/molifaqi/1/edit .
Allan