1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "iDisplayLength" );
4 $(document).ready( function () {
5 /* Check the default */
6 $('#example').dataTable( {
8 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php"
12 "Default length is ten",
14 function () { return $('#example tbody tr').length == 10; }
18 "Select menu shows 10",
20 function () { return $('#example_length select').val() == 10; }
25 "Set initial length to 25",
28 $('#example').dataTable( {
30 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
34 function () { return $('#example tbody tr').length == 25; }
38 "Select menu shows 25",
40 function () { return $('#example_length select').val() == 25; }
45 "Set initial length to 100",
48 $('#example').dataTable( {
50 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
54 function () { return $('#example tbody tr').length == 57; }
58 "Select menu shows 25",
60 function () { return $('#example_length select').val() == 100; }
65 "Set initial length to 23 (unknown select menu length)",
68 $('#example').dataTable( {
70 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
74 function () { return $('#example tbody tr').length == 23; }
78 "Select menu shows 10 (since 23 is unknow)",
80 function () { return $('#example_length select').val() == 10; }