1 // DATA_TEMPLATE: js_data
2 oTest.fnStart( "fnInitComplete" );
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.fnInitComplete == null; }
22 "Two arguments passed",
27 $('#example').dataTable( {
29 "fnInitComplete": function ( ) {
30 mPass = arguments.length===2 && arguments[1]===undefined;
34 function () { return mPass; }
39 "That one argument is the settings object",
43 oTable = $('#example').dataTable( {
45 "fnInitComplete": function ( oSettings ) {
50 function () { return oTable.fnSettings() == mPass; }
55 "fnInitComplete called once on first draw",
60 $('#example').dataTable( {
62 "fnInitComplete": function ( ) {
67 function () { return mPass == 1; }
71 "fnInitComplete never called there after",
73 $('#example_next').click();
74 $('#example_next').click();
75 $('#example_next').click();
77 function () { return mPass == 1; }