1 // DATA_TEMPLATE: dom_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();
9 var oSettings = oTable.fnSettings();
13 "Default should be null",
15 function () { return oSettings.fnDrawCallback == null; }
20 "One argument passed",
25 $('#example').dataTable( {
26 "fnDrawCallback": function ( ) {
27 mPass = arguments.length;
31 function () { return mPass == 1; }
36 "That one argument is the settings object",
40 oTable = $('#example').dataTable( {
41 "fnDrawCallback": function ( oSettings ) {
46 function () { return oTable.fnSettings() == mPass; }
51 "fnRowCallback called once on first draw",
56 $('#example').dataTable( {
57 "fnDrawCallback": function ( ) {
62 function () { return mPass == 1; }
66 "fnRowCallback called once on each draw there after as well",
68 $('#example_next').click();
69 $('#example_next').click();
70 $('#example_next').click();
72 function () { return mPass == 4; }