Q:

JQuery Datatables. How can I change the current page programmatically?

I have pagination on my table. I want go back back to the first page whenever a function is called. How can I do that?

A:

from the docs: http://datatables.net/ref#fnPageChange
$(document).ready(function() {
  var oTable = $('#example').dataTable();
  oTable.fnPageChange( 'first' );
} );

A:

var oTable = $('#example').dataTable();
oTable.fnPageChange( 'first' );

OR
oTable.fnPageChange( 0 );

A:

In the Datatables version 10 there is a page() function which is used to change the page.
For eg. table.page('first'); will jump to first page
table.page(pageNumber); will jump to the corresponding page where pageNumber is indexed from 0.
Reference: http://datatables.net/reference/api/page()

