title: Is documents loaded to div, stay in memory after I load another?
body: <ol>
  <li><p>I have <code>DIV</code> with <code>id="popupWindow"</code>. I'm loading <code>doc1.html</code> doc that contains Javascript  code to this <code>DIV</code>.
  My question is if I will load another document into <code>popupWindow</code> after, will java scripts from past document still be in memory?</p></li>
  <li><p>And if I will be loading doc1.html several times, will those script be doubled/tripled in memory, causing huge memory leaks?</p></li>
  <li><p>Should I just load scripts seperatly aside from html doc, or is it ok to have JS in this <code>doc1.html</code>?</p></li>
  </ol>
  
  <p>Edit:
  Programing version of question:
  1. If I use $("#id").load("somedoc.html"). Scripts from somedoc.html will be loaded. Then if I will use $("#id").load("somedoc.html2"). Will scripts from somedoc.html disapear from memory, like DOM elements?
  2. If it will remain, so if i will load somedoc.html many times after will it junk memory?</p>