title: JQuery .get doesnt execute Javascript
body: <p>I am using JQuery .get method to retrieve some content from a webpage (page 1) and show it in a div in the main page. The problem is the content retrieved contains some javascript calls. The content is being displayed, but the <strong>Javascript methods are not getting executed</strong>. The .js file is being referenced across all the pages, so the availability of the js in the main is not a problem.</p>
  
  <p>This is the code in the main page. URL of page 1 is given to the .get function:</p>
  
  <pre><code>$.get(url, function(response) {          
      var newContent = $(response).find("#right");      //Find the content section of the response
      var contentWrapper = $("#wrap");         //Find the content-wrapper where we are supposed to change the content.
      var oldContent = contentWrapper.find("#right");   //Find the old content which we should replace.
  
      oldContent.replaceWith(newContent);
  });
  </code></pre>
  
  <p>This is the code in the #right (div) of Page 1</p>
  
  <pre><code>Some html tags...    
  &lt;p&gt;&lt;script type="text/javascript"&gt;abc7();&lt;/script&gt;&lt;/p&gt;
  &lt;p&gt;&lt;script&gt;s(30)&lt;/script&gt;&lt;/p&gt;
  Some html tags...
  </code></pre>
  
  <p>The functions abc7 and s are available in a .js (normal javascript file) that is being reference in the  section of all pages</p>
  
  <p>The s(30) should display a  text field of size 30.</p>