DataTables logo DataTables

DataTables HTML sorting example

Preamble

DataTables will attempt to automatically detect the data types that your table contains, allowing it to accurately sort and filter this data. This example shows automatic type detection of HTML information - note that the sorting is correct on the second column for the visible information. Additional data types can be added through plug-ins.

Note that prior to DataTables 1.7 the HTML type was not automatically detected, and it was necessary to specify the sType for the column - this is now not needed as seen in this example. If you do want to be able to sort and filter on the HTML information you can specify the sType for the column as 'string'.

Live example

Reflection Link
DataTables DataTables
Integrity A link to Integrity
Integrity Integrity

Initialisation code

$(document).ready(function() {
	$('#example').dataTable();
} );

Other examples