Ok so I see in the documentation that this return a dataTables settings object which has some useful data. Is there some callback that returns the oTable object?
The value of 'this' in fnInitComplete is currently the DataTables settings object for the table in question (since the function was executed in that scope). I think executing the call back functions with 'this' actually being the DataTables object is a much better idea, and I'll look at the possibility of including this in 1.7.
fnInitComplete does indeed execute with the scope of the DataTables instance, as should all callback functions in DataTables. Some might return the settings object (fnSettings for example), but all should execute with the same scope. Is it the documentation for fnInitComplete you are referring to?
Yes fnInitComplete function appears to use 'this' to mean the table object vs the settings object (of course, my javascript knowledge is not the best, so I'm willing to be corrected.
Replies
The value of 'this' in fnInitComplete is currently the DataTables settings object for the table in question (since the function was executed in that scope). I think executing the call back functions with 'this' actually being the DataTables object is a much better idea, and I'll look at the possibility of including this in 1.7.
Regards,
Allan
It looks like it did, but http://www.datatables.net/usage/callbacks still says it returns the settings object.
fnInitComplete does indeed execute with the scope of the DataTables instance, as should all callback functions in DataTables. Some might return the settings object (fnSettings for example), but all should execute with the same scope. Is it the documentation for fnInitComplete you are referring to?
Thanks,
Allan