I have a jQuery plugin, say 'myPlugin' that I use as follow:
If my DOM contains:
<div id="some-element">Nothing special here</div>
I will call my plugin on the div:
$('#some-element').myPlugin();
It will make the plugin do its things which will result in (for instance):
<div id="some-element">Something happened here</div>
I'm trying to figure out if this plugin can be used somehow as a component in a wirejs spec, like in the example below (except there is no such thing as the onDom I'm using):
define({
myPluginComponent: {
create: {
module: 'myPlugin',
onDom: '#some-element'
}
}
});
I would imagine some folks already tried to use wirejs with jQuery plugins. Can someone please share an example or some documentation on it?