title: JQuery: How to get all of a selector's html attributes in one statement, as a string?
body: <p>I've got a div that looks like this:</p>
  
  <pre><code>&lt;div id="exampleDiv" class="class1 class2" title="example title"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I've selected with JQuery using this statement:</p>
  
  <pre><code>var $div = $('#exampleDiv');
  </code></pre>
  
  <p>What I'd like to get is a string of the tag itself as html, so that I actually get:</p>
  
  <pre><code>"&lt;div id='exampleDiv' class='class1'....", etc.
  </code></pre>
  
  <p>Does anyone know of a JQuery function I could use that does this, given the selector? I'm thinking something like <code>$div.htmlHeader()</code> or something like that.</p>
  
  <p>Any help would be appreciated. Thanks.</p>