1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "fnDrawCallback" );
4 /* Fairly boring function compared to the others! */
6 $(document).ready( function () {
7 /* Check the default */
8 var oTable = $('#example').dataTable( {
10 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php"
12 var oSettings = oTable.fnSettings();
16 "Default should be null",
18 function () { return oSettings.fnDrawCallback == null; }
23 "One argument passed",
28 $('#example').dataTable( {
30 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
31 "fnDrawCallback": function ( ) {
32 mPass = arguments.length;
36 function () { return mPass == 1; }
41 "That one argument is the settings object",
45 oTable = $('#example').dataTable( {
47 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
48 "fnDrawCallback": function ( oSettings ) {
53 function () { return oTable.fnSettings() == mPass; }
58 "fnRowCallback called once on first draw",
63 $('#example').dataTable( {
65 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
66 "fnDrawCallback": function ( ) {
71 function () { return mPass == 1; }
75 "fnRowCallback called once on each draw there after as well",
77 $('#example_next').click();
78 $('#example_next').click();
79 $('#example_next').click();
81 function () { return mPass > 1; }