I'm struggling with the Jquery clone. I can clone a single line of HTML, but I don't have a clue on how to clone a block.
I have this block:
<div class="item-name">
<label for="id_form-0-name"></label>
<select id="id_form-0-name" name="form-0-name"></select>
</div>
And I need to produce more two blocks, each time changing the attributes of the new block to reflect its position.
<div class="item-name">
<label for="id_form-1-name"></label>
<select id="id_form-1-name" name="form-1-name"></select>
</div>
<div class="item-name">
<label for="id_form-2-name"></label>
<select id="id_form-2-name" name="form-2-name"></select>
</div>
Any clue on what I've to do to obtain that output?