FixedHeader example

Preamble

When displaying large amounts of data in a table, it can often be useful for the end user to have the column titles (the "thead" element as a whole in fact) always visible. This is particularly true if using DataTables with pagination disabled, or the display length is set to a high value.

The "FixedHeader" add-on for DataTables will ensure that your column titles will scroll with the page, showing at the top of the table at all times. Try the demo shown below - you might want to try resizing the window for full effect! Note also that the column titles remain clickable to perform sorting on the table.

Live example

Rendering engineBrowserPlatform(s)Engine versionCSS grade
Rendering engineBrowserPlatform(s)Engine versionCSS grade
Gecko Firefox 1.0 Win 98+ / OSX.2+ 1.7 A
Gecko Firefox 1.5 Win 98+ / OSX.2+ 1.8 A
Gecko Firefox 2.0 Win 98+ / OSX.2+ 1.8 A
Gecko Firefox 3.0 Win 2k+ / OSX.3+ 1.9 A
Gecko Camino 1.0 OSX.2+ 1.8 A
Gecko Camino 1.5 OSX.3+ 1.8 A
Gecko Netscape 7.2 Win 95+ / Mac OS 8.6-9.2 1.7 A
Gecko Netscape Browser 8 Win 98SE+ 1.7 A
Gecko Netscape Navigator 9 Win 98+ / OSX.2+ 1.8 A
Gecko Mozilla 1.0 Win 95+ / OSX.1+ 1 A
Gecko Mozilla 1.1 Win 95+ / OSX.1+ 1.1 A
Gecko Mozilla 1.2 Win 95+ / OSX.1+ 1.2 A
Ligne 1 � 12 -- Total: 57 lignes

Initialisation code

$(document).ready( function () {
	var oTable = $('#example').dataTable();
	new FixedHeader( oTable );
} );

Examples

Empty paragraphs to force scrolling!...

 

Rendering engineBrowserPlatform(s)Engine versionCSS grade