title: Jquery .load removes <script>...</script> content
body: <p>when i call .load function, it brings me the HTML code but it wipes out the <code>&lt;script&gt;</code> content, code from cards.tpl.php: </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
       //anything
  &lt;/script&gt;
  &lt;div style="float:right" class="blah"&gt;
  &lt;!-- anything --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>code from index.php:</p>
  
  <pre><code>&lt;div id="cards"&gt;
       &lt;?php include 'tpl/cards.tpl.php'; ?&gt;
  &lt;/div&gt;
  ...
  &lt;script type="text/javascript"&gt;
      $('#drawCard').click(function(){
              $('#cards').load("tpl/cards.tpl.php",function(){
              });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>When PHP includes the content, it includes the <code>&lt;script&gt;</code>, however when i click on #drawCard the JavaScript only brings me the div. I just saw that .load actually removes script tags but they are executed, do bound events remain after execution?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Ok, finally i got a solution to the problem behind all this. Using load() to call <code>&lt;script&gt;&lt;/script&gt;</code> that contains event binding code will give you tons of headaches. DON'T DO IT!. If your real problem was dealing with issues of binding after using the $.load() function, then i recommend doing the following:</p>
  
  <p>Replaced the all the click(), on('click') events  with a plugin called <a href="http://docs.jquery.com/Plugins/livequery" rel="nofollow">livequery</a> using livequery('click'), it works 100%. </p>
  
  <p>Not with in the mood of oppening a new question but why does JQuery tells you to replace live() with on() when it will not work as expected?. </p>
  
  <p><strong>edit for JAAulde</strong></p>
  
  <pre><code>&lt;div id="cards"&gt;
      &lt;!-- this content is replaced --&gt;
      &lt;div value="t1" class="impar tecnologia unselected investigated notUsed"&gt;stuff&lt;/div&gt;
      &lt;/div&gt;
      &lt;!-- end of content replaced--&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and using this jQuery code:</p>
  
  <pre><code>$("#cards").on('click','.unselected',(function(e){}));
  </code></pre>
  
  <p>This works before load, and does not work after</p>