Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove first, and last pagination from the jquery data table

I'm currently using jQuery Datatable. I also use jquery ui to provide good theme. However, I want to disable (hide) the first and last button of the pagination from the table by using a bit customization on jquery library. enter image description here

The problem is that the customization has only 2 methods: full_numbers and two_button.

So how can I get the pagination without the first and last button?

Any help would be very much appreciated.

Thanks

like image 315
Tepken Vannkorn Avatar asked Nov 29 '22 14:11

Tepken Vannkorn


1 Answers

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 :

$("#youridtable").dataTable(
{
  "pagingType": "simple_numbers"
});

src: http://www.datatables.net/examples/basic_init/alt_pagination.html

like image 156
jteks Avatar answered Dec 05 '22 17:12

jteks