Reputation: 11266
I want to use a jQuery plugin in my Sencha Touch application.
The jQuery plugin should be initialized at startup, but only after Sencha Touch is finished filling the DOM with its magic.
This is because the plugin scans the DOM for certain elements and alters them.
If I use $(document).Ready()
, the <body>
tag is still untouched by Sencha Touch, even when I place the Sencha Touch code above the jQuery code.
What is the best practice way to handle this issue?
Upvotes: 0
Views: 434
Reputation: 1307
You can also use the painted
event of your view:
config: {
...
listeners:{
painted: function(){
// all the DOM are in place
}
}
}
Upvotes: 1
Reputation: 114367
You need to tap into EXT's own onReady event.
Ext.setup({
// system-generated set-up code
onReady: function() {
// write your setup code here
}
});
Upvotes: 1