title: How do I run a jQuery function after jQuery is loaded?
body: <p>At my website, I am loading jQuery asynchronously.</p>
  
  <p>In order to do that, I must run jQuery functions only after it is really loaded.</p>
  
  <p>I've tried two pure JS ways:</p>
  
  <pre><code>&lt;script src="js/jquery-2.2.2.min.js" async&gt;&lt;/script&gt;
  &lt;script&gt;
      window.addEventListener('load', function() {
          //stuff
      }, true);
  &lt;/script&gt;
  </code></pre>
  
  <p>And</p>
  
  <pre><code>window.onload = function() {
      //stuff
  }
  </code></pre>
  
  <p>But even so I still get <code>Uncaught TypeError: $(...) is not a function at...</code></p>
  
  <p>How do I fire jQuery functions after the lib is fully loaded?</p>