Reputation: 21
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.
Upvotes: 2
Views: 4999
Reputation: 146
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
Upvotes: 2