Someone will be able to explain on the fingers and the example of the code how to replace one dom-element with another.
There is a code:
<td id="18"><div class="label"></div> текст</td> <td id="22"><div class="label"></div> тут тоже текст</td> <div class="pp"> <div class="label" id="3"></div> <div class="label" id="4"></div> </div>
By clicking on div.label, div.pp pops up, and when you click on one of the divs inside div.pp, this div should replace the div inside the td cell, on which the div.pp was called. Replacement should occur by cloning - this is the time, and it is not the text inside div.label that needs to be replaced, but the object itself.
I will not catch up on how it is done. Can someone tell me?