I want to clone a div
using it's id
with many elements inside it which also has their own id
that I want to change after cloning.
Consider this HTML structure:
<div id='wrapper1'>
<p id='test1'>Hello</p>
<p id='my-awesome-id1'></p>
</div>
I found this on SO but it only changes the id
of the main element you cloned and not the children.
Is there a way I could do it so that I could update all of the 1
into 2
and so on?