Cross plugins communication?
Cross plugins communication?
donnie
Posts: 6Questions: 0Answers: 0
Hello,
I'm creating a custom plugin. I would like to save some information from this plugin, and retrieve this information from another plugin.
I tried to do this in my custom plugin:
oDTSettings.oInstance._oPluginColResize = this;
Then in the ColReorder plugin, I'm trying to retrieve this variable:
this.s.dt.oInstance._oPluginColResize // undefined :(
So it seems oDTSettings.oInstance and this.s.dt.oInstance are 2 different objects.
Could anybody please help?
This discussion has been closed.
Replies
Correct - use the settings object itself. It is the only thing that is guaranteed to be unique for a table. The instance is not as you can have multiple jQuery references to it.
For example, consider:
$('#myId') !== $('#myId')
. They both point to the same element, but they are not the same instance!Allan
Thank you for your fast answer allan, it's much appreciated!