title: Get the content of another page's div with jQuery Ajax
body: <p>I would like page.html to ajax-request the content of side.html and extract the content of two of its divs. But I cannot find the correct way to parse the response, despite everything I tried. </p>
  
  <p>Here is side.html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Useless&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="a"&gt;ContentA&lt;/div&gt;
  &lt;div id="b"&gt;ContentB&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and here is page.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Useless&lt;/title&gt;
  &lt;script type='text/javascript' src='jquery-1.9.0.min.js'&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  Hello
  &lt;script type="text/javascript"&gt;
  jQuery.ajax({
          url: "side.html",
          success: function(result) {
              html = jQuery(result);
  
              alert(html.find("div#a").attr("id"));
              alert(html.find("div#a").html());
              alert(html.find("div#a"));
  
          },
      });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I access this page, I get no error, and the three alert()s yield undefined, undefined and [object Object]. What am I doing wrong? Example is live <a href="http://xuneo.com/jqueryproblem/" rel="noreferrer">here</a>.</p>