title: Jquery HTML() function - how to include selector Html
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2419749/get-selected-elements-outer-html">Get selected element&#39;s outer HTML</a>  </p>
  </blockquote>
  
  
  
  <p>I suspect this is a really stupid question, but when you call the Html() function in JQuery it returns the selected nodes inner Html. Is there anyway of including the selected note in the returned Html? For example on the following HTML</p>
  
  <pre><code>&lt;div class="demo-container"&gt;
    &lt;div class="demo-box"&gt;Demonstration Box&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>this call <code>$('div.demo-container').html();</code> returns</p>
  
  <pre><code>&lt;div class="demo-box"&gt;Demonstration Box&lt;/div&gt;
  </code></pre>
  
  <p>How do I get it to return</p>
  
  <pre><code>&lt;div class="demo-container"&gt;
    &lt;div class="demo-box"&gt;Demonstration Box&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Thanks for the help!</p>