title: Why is my alert not displaying the DIV I want it to display?
body: <p>The following code sends an alert to the screen as 'undefined'. I would like to alert the <code>html</code> of <code>#div</code>.</p>
  
  <pre><code>    $.ajax({
          type: "POST",
          url: pageurl,
          dataType: "html",
          success: function(data){
              alert($(data).children("#div").html());
          }       
      });
  </code></pre>
  
  <p>I could do something like in load, but I don't think I'm allowed:</p>
  
  <pre><code>    url: pageurl + ' #div'
  </code></pre>
  
  <p>How can I resolve this?</p>
  
  <p><strong>UPDATE</strong>: Based on advice from @Murali, I've tried the following, but it still doesn't behave as I would like:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="jquery-1.8.2.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      $(document).ready(function() {  
      $.ajax({
              type: "POST",
              url: 'index.html',
              dataType: "html",
              success: function (data) {                    
                  alert($(data).find('#site-content').html());
              }
          });
  });
    &lt;/script&gt;
  
  &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="site-content"&gt;
      some data&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>