1 // DATA_TEMPLATE: js_data
2 oTest.fnStart( "aaSortingFixed" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable( {
9 var oSettings = oTable.fnSettings();
12 "No fixed sorting by default",
15 return oSettings.aaSortingFixed == null;
21 "Fixed sorting on first column (string/asc) with user sorting on second column (string/asc)",
24 $('#example').dataTable( {
26 "aaSortingFixed": [['0','asc']]
28 $('#example thead th:eq(1)').click();
30 function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; }
34 "Fixed sorting on first column (string/asc) with user sorting on second column (string/desc)",
36 $('#example thead th:eq(1)').click();
38 function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; }
42 "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/asc)",
45 $('#example').dataTable( {
47 "aaSortingFixed": [['3','asc']]
49 $('#example thead th:eq(1)').click();
51 function () { return $('#example tbody td:eq(1)').html() == "All others"; }
55 "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/desc)",
57 $('#example thead th:eq(1)').click();
59 function () { return $('#example tbody td:eq(1)').html() == "PSP browser"; }