1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "aaSortingFixed" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable();
7 var oSettings = oTable.fnSettings();
10 "No fixed sorting by default",
13 return oSettings.aaSortingFixed == null;
19 "Fixed sorting on first column (string/asc) with user sorting on second column (string/asc)",
22 $('#example').dataTable( {
23 "aaSortingFixed": [['0','asc']]
25 $('#example thead th:eq(1)').click();
27 function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; }
31 "Fixed sorting on first column (string/asc) with user sorting on second column (string/desc)",
33 $('#example thead th:eq(1)').click();
35 function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; }
39 "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/asc)",
42 $('#example').dataTable( {
43 "aaSortingFixed": [['3','asc']]
45 $('#example thead th:eq(1)').click();
47 function () { return $('#example tbody td:eq(1)').html() == "All others"; }
51 "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/desc)",
53 $('#example thead th:eq(1)').click();
55 function () { return $('#example tbody td:eq(1)').html() == "PSP browser"; }