title: Get entire opening tag using jQuery
body: <p>Let's say the HTML is:</p>
  
  <pre><code>&lt;div id="page" class="someclass"&gt; more divs &lt;/div&gt;
  </code></pre>
  
  <p>How do I get the entire opening tag and its attributes (but not the closing tag) as it shows in the HTML by using the ID? For example:</p>
  
  <pre><code>$('#page').tag();
  </code></pre>
  
  <p>Would then return:</p>
  
  <pre><code>&lt;div id="page" class="someclass"&gt;
  </code></pre>