title: jquery (over)writes DOM instead of div
body: <p>I have an index.html and a linked script. My jQuery code that should .html write content into a div from the linked script, however it rewrites the entire page. The .text works great, however the content that has to be written contains a script.</p>
  <p>index.html</p>
  <pre><code>&lt;head&gt;
      &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;scripts/scripts.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
     &lt;div class=&quot;copyright&quot; name=&quot;copyright&quot;&gt;
     &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  <p>script.js</p>
  <pre><code>$(document).ready(function () {
      $(&quot;div.copyright&quot;).html(&quot;&amp;copy; &lt;script&gt; new Date().getFullYear()&gt;2010&amp;&amp;document.write(new Date().getFullYear()) &lt;/script&gt; myName&quot;);
  });
  </code></pre>
  <p>The current result is a webpage that loads &quot;2017&quot;. But it should return &quot;© 2017 myName&quot;. Does anyone know how to fix this? Or if it is at all possible to write both html and scripts with the .html method?</p>