How to jump into specific page in datatables

Viewed 36

An input box to enter a specific page number. On keyup, the datatable has to be on the typed page number with corresponding data

Tried page() api

var table = $('#dataList').DataTable({});
table.page(2).draw( 'page' );

But not working. is there any solution to do the same.

1 Answers

You can try this

$(document).ready( function () {
  var table = $('#example').DataTable();
   var pageNo =6
   table.page(pageNo-1).draw('page');
} );

its working for me check this demo

Related