title: jQuery: how to change tag name?
body: <p>jQuery: how to change tag name?</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;tr&gt;
      $1
  &lt;/tr&gt;
  </code></pre>
  
  <p>I need</p>
  
  <pre><code>&lt;div&gt;
      $1
  &lt;/div&gt;
  </code></pre>
  
  <p>Yes, I can</p>
  
  <ol>
  <li>Create DOM element &lt;div></li>
  <li>Copy tr content to div</li>
  <li>Remove tr from dom</li>
  </ol>
  
  <p>But can I make it directly?</p>
  
  <p>PS:</p>
  
  <pre><code>    $(tr).get(0).tagName = "div"; 
  </code></pre>
  
  <p>results in <code>DOMException</code>.</p>