View Full Version : $(document).ready vs Ext.onReady()

30 Jan 2013, 2:01 AM
As the title suggests, whats the difference? As I see their definitions are the same, but apparently Ext.onReady() does some extra/specific for ExtJS magic without which my ExtJS app does not work.

I've posted the detailed question of my issue here. (http://stackoverflow.com/questions/14601054/ext-onready-vs-document-ready) Any input on this topic would be really helpful.

Thanks for any help.

30 Jan 2013, 3:02 PM
If you're using dynamic class loading, Ext.onReady() means wait til the DOM is ready and all required classes are loaded.

If you're not using the loader, then onReady() is essentially the equivalent of $().ready();

7 Feb 2013, 4:14 PM
Thank you for your support. Your input actually helped alot. But I have another question which google-fu din't help me alot.

Is it wise to use multiple Ext.onReady();? What happens if I have multiple onReady functions in multiple documents and what if I have multiple onReady in one document?
I'm just interested in whats the best practice?

Thanks alot for good support. =)