Reputation: 461
I have used datadables.net pagination for my html table. And i want to hide/remove the 1 2 3 ... buttons in pagination and have only Next and Previous Buttons on it.
Is it Possible like doing pagingnumbers: false,(something like this simple change in code) ?
My Function:-
$('#pagination').DataTable( {
"pagingType": "full_numbers",
"iDisplayLength": 2,
"bFilter": false
} );
Upvotes: 0
Views: 1286
Reputation: 86
You have 4 options:
simple - 'Previous' and 'Next' buttons only
simple_numbers - 'Previous' and 'Next' buttons, plus page numbers
full - 'First', 'Previous', 'Next' and 'Last' buttons
full_numbers - 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers
So in your case :
$('#pagination').DataTable( {
"pagingType": "simple",
"iDisplayLength": 2,
"bFilter": false
} );
Upvotes: 1
Reputation: 2675
You have to set...
"pagingType": "full",
Here you can find all posible combinations...
https://datatables.net/reference/option/pagingType
I hope it helps
Upvotes: 1