plugin that is automatically called at init?
plugin that is automatically called at init?
Hello I have made a test plugin
[code]
$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
{
....
}
[/code]
is it possible to make it execute after init, just by including it's sourcecode ?
without having to add to all my pages this
[code]
"fnInitComplete": function()
{
this.fnPagingInfo();
}
[/code]
[code]
$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
{
....
}
[/code]
is it possible to make it execute after init, just by including it's sourcecode ?
without having to add to all my pages this
[code]
"fnInitComplete": function()
{
this.fnPagingInfo();
}
[/code]
This discussion has been closed.
Replies
[code]
_fnCallbackReg( oSettings, 'aoInitComplete', oInit.fnInitComplete, 'user' );
[/code]
Allan
and if i add the row inside [code]$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )[/code] then it doesn't get executed
hopefully this will help others
[code]
$.fn.dataTable.models.oSettings['aoInitComplete'].push( {
"fn": $.fn.dataTableExt.oApi.fnPagingInfo,
"sName": 'whatever'
} );
[/code]