How to modify cloned field form value and id inside table row?
<p>I have 2 fields in my form that I want to clone using jQuery, but the selecting html table structure got me confused on how to change the id and the value of my form field and also the label text. Here's the form field structure</p>

<pre><code>&lt;table&gt;
 &lt;tbody&gt;
    &lt;tr id="attribute-name"&gt;
      &lt;td class="label"&gt;&lt;label for="listing_qty"&gt;quantity&lt;/label&gt;&lt;/td&gt;
      &lt;td class="value"&gt;
        &lt;input id="listing_qty" name="field_name[]" value="quantity" class="required-entry disabled attribute-name input-text" readonly="1" type="text"&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr id="attribute-custom"&gt;
      &lt;td class="label"&gt;&lt;/td&gt;
      &lt;td class="value"&gt;
        &lt;input id="listing_custom_field" name="custom_field[]" value="" placeholder="Custom Attribute Field" type="text" class=" input-text"&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>