title: Script not loading when added dynamically with jQuery
body: <p>I'm trying to dynamically add a script to my project using jQuery. The script is successfully added to the <code>head</code> tag but the content is not rendered in the <code>body</code> tag.</p>
  
  <p>This is my code:</p>
  
  <pre><code>  &lt;script type="text/javascript"&gt;
      window.onload = function() {
          var s = document.createElement("script");
          s.type = "text/javascript";
          s.src = "https://form.jotform.com/jsform/81003857231348";
          $("head").append(s);
      }
    &lt;/script&gt;
  </code></pre>
  
  <p>However the script loads successfully if I add it directly:<br>
  <code>&lt;script type="text/javascript" src="https://form.jotform.com/jsform/81003857231348"&gt;&lt;/script&gt;</code></p>
  
  <p><a href="https://jsfiddle.net/xpvt214o/98587/" rel="nofollow noreferrer">https://jsfiddle.net/xpvt214o/98587/</a></p>
  
  <p>Am I missing something?</p>