title: $/jQuery not defined when dynamically adding scripts
body: <p>I am dynamically adding <code>&lt;script&gt;</code> tags for different <code>.js</code> resources into the head, however I receive an error exclaiming that <code>jQuery is not defined</code>.</p>
  
  <p>I know that jQuery is in fact working, as other functions further down the flow are working correctly. Below is the code that I am using to dynamically add these scripts to the header. As you can see, I also include jQuery before any other plugins. </p>
  
  <pre><code>document.addEventListener("DOMContentLoaded", AddExternals)
  
  function AddExternals(){
      var jq = document.createElement("script");
      jq.type = "text/javascript";
      jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js";
  
  
      var t2e = document.createElement("script");
      t2e.type = "text/javascript";
      t2e.src = "/test/rfsystem/rfJavascript/table2excel.js";
  
      document.getElementsByTagName("head")[0].appendChild(jq);
      document.getElementsByTagName("head")[0].appendChild(t2e);
  
     console.log(jQuery);
  }
  </code></pre>