title: Jquery copy and paste DOM node?
body: <p>I have a table that looks like the following.</p>
  
  <pre><code>&lt;tr&gt;
    &lt;td&gt;Link Name&lt;/td&gt;
    &lt;td&gt;&lt;a href="#" class="edit"&gt;Edit&lt;/a&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>At the bottom of the table I have the following.</p>
  
  <pre><code>&lt;tr&gt;
    &lt;form class="hidden create"&gt;
      &lt;h3&gt;Add Link&lt;/h3&gt;
      ...
      &lt;input type="hidden" name="form_id" value="{menu-id}" /&gt;
    &lt;/form&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>To avoid a massive page of HTML I thought it would be cool if jquery could copy the create form, tweak a few attributes then make it appear after the links row. The only query really is how..</p>
  
  <p>So here are my questions.</p>
  
  <p>1) How do I grab the create form and save it as variable with jquery?</p>
  
  <p>2) How do I edit the hidden field? I know how to change attributes but how do I select the field it once the form is within a variable?</p>
  
  <p>3) How do I paste this form into my table after the edit link on its own row? I need something like parent-parent-after?</p>
  
  <p>Thanks loads</p>