title: jQuery html() function with javascript
body: <p>It appears that the .html function doesn't return javascript.  Is there a function that returns both javascript and html?  </p>
  
  <p>EDIT:</p>
  
  <p>Example:</p>
  
  <p>Main Page</p>
  
  <pre><code>$.ajax({        
    url: 'ajaxpage.php',
    type: 'post',
    data: postvars,
    cache: false,
    dataType: 'html',
    success: function (html) {
      $('#content').html($(html).find('#content').html());
    }
  });
  </code></pre>
  
  <p>ajaxpage.php</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;div id="content"&gt;
     //SOME HTML
     &lt;script type="text/javascript"&gt;
        //SOME JAVASCRIPT
     &lt;/script&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>$(html).find('#content').html() returns </p>
  
  <pre><code>   //SOME HTML
  </code></pre>
  
  <p>while I want</p>
  
  <pre><code>   //SOME HTML
     &lt;script type="text/javascript"&gt;
        //SOME JAVASCRIPT
     &lt;/script&gt;
  </code></pre>