Scroller API example

Preamble

This example shows a trivial use of the Scroller API to scroll the table to row 1000 once the table has been loaded. Any number could be used here, and a small animated effect is used to provide visual feedback to the user (this can be disabled by passed false as a second parameter to fnScrollToRow).

Live example

ID First name Last name ZIP Country

Initialisation code

$(document).ready(function() {
	$('#example').dataTable( {
		"sScrollY": "200px",
		"sAjaxSource": "media/data/2500.txt",
		"sDom": "frtiS",
		"bDeferRender": true,
		"fnInitComplete": function () {
			this.fnSettings().oScroller.fnScrollToRow( 1000 );
		}
	} );
} );

Other examples