title: How do I wait for both Cordova and jQuery to load their libraries?
body: <p>jQuery has the "ready" function:</p>
  
  <pre><code>$(function() {...});
  </code></pre>
  
  <p>and the cordova documentation says to add an event listener:</p>
  
  <pre><code>document.addEventListener("deviceready", onDeviceReady, false();
  function onDeviceReady(){...}
  </code></pre>
  
  <p><strong>Do I need to call both of these to make sure both the libraries are loaded before any code that references them is used?</strong></p>
  
  <p>Does it make sense to nest them, i.e.:</p>
  
  <pre><code>$(function(){
      onDeviceReady(){...}
  }
  </code></pre>
  
  <p>Just trying to figure out the best way to do this, maybe I am overthinking it</p>