DataTables alternative pagination example

Preamble

The page controls which are used by default in DataTables (forward and backward buttons only) are great for most situations, but there are cases where you may wish to customise the controls presented to the end user. This is made simple by DataTables through it's extensible pagination mechanism. There are two types of pagination controls built into DataTables: two_button (default) and full_numbers. To switch between these two types, use the sPaginationType initialisation parameter. You can add additional types of pagination control by extending the $.fn.dataTableExt.oPagination object.

The example below shows the full_numbers type of pagination, where 'first', 'previous', 'next' and 'last' buttons are presented, as well as the five pages around the current page.

Live example

Show entries
Search:
Rendering engineBrowserPlatform(s)Engine versionCSS grade
GeckoFirefox 1.0Win 98+ / OSX.2+1.7A
GeckoFirefox 1.5Win 98+ / OSX.2+1.8A
GeckoFirefox 2.0Win 98+ / OSX.2+1.8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1.9A
GeckoCamino 1.0OSX.2+1.8A
GeckoCamino 1.5OSX.3+1.8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1.7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1.8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
Rendering engine Browser Platform(s) Engine version CSS grade
Showing 1 to 10 of 51 entries
FirstPrevious12345NextLast

Initialisation code

$(document).ready(function() {
	$('#example').dataTable( {
		"sPaginationType": "full_numbers"
	} );
} );

Other examples

Basic initialisation

Advanced initialisation

API

Please refer to the DataTables documentation for full information about it's API properties and methods.