title: Ext.onReady() vs $(document).ready()
body: <p>Whats the difference? I have on $(document).ready function which should check if extjs is loaded but the main problem is extjs does not load on time and things inside $(document).ready starts to execute, extjs create function which produces the main error 'cannot execute create of undefined' on Ext.create("...", {..}); line. If i put double check like this:</p>
  
  <pre><code>$(document).ready(function() {
      Ext.onReady(function() {
          Ext.create('Ext.Button', {...});
      });
  });
  </code></pre>
  
  <p>Things magically work. Now I'm using ext-all.js which has ~1.3MB minified which is pretty large imho...and things get magically loaded while he does the second check...but I think those 2 functions are not the same as they definitions suggest, because if I put another $(document).ready instead of Ext.onReady() line, things break again. I think Ext.onReady({}); function does some other black magic which $(document).ready() does not, and I'm interested if someone knows what is this kind of magic?</p>
  
  <p>Because it work's and I don't know why which is killing me. </p>
  
  <p>Thanks for reading the post. =)
  ps. I'm using ExtJS for about day so I'm pretty new to it.</p>