1 // DATA_TEMPLATE: js_data
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( {
11 var oSettings = oTable.fnSettings();
15 "Default should be null",
17 function () { return oSettings.fnDrawCallback == null; }
22 "One argument passed",
27 $('#example').dataTable( {
29 "fnDrawCallback": function ( ) {
30 mPass = arguments.length;
34 function () { return mPass == 1; }
39 "That one argument is the settings object",
43 oTable = $('#example').dataTable( {
45 "fnDrawCallback": function ( oSettings ) {
50 function () { return oTable.fnSettings() == mPass; }
55 "fnRowCallback called once on first draw",
60 $('#example').dataTable( {
62 "fnDrawCallback": function ( ) {
67 function () { return mPass == 1; }
71 "fnRowCallback called once on each draw there after as well",
73 $('#example_next').click();
74 $('#example_next').click();
75 $('#example_next').click();
77 function () { return mPass == 4; }