如何在其他div(container2)中显示用户更新的div(container1)的内容
<div id="container1">
<div id="slide1"> Content here include input box, select dropdown, normal text </div>
<div id="slide2"> Editable Table </div>
<div id="slide3"> Editable images </div>
//Each slide will be hidden after it is updated
</div>
<div id="container2">
//Basically this is editable summary of all the slides
//But by using clone, only empty text box/dropdowns are displayed
//How to display the contents of updated slide1, slide2 and slide3 so that it can be editable like in previous container1 (replicating the container1)
</div>
最佳答案
如果您想附加:
$("#container2").append($("#container1").clone().children());
如果你想替换:
$("#container2").empty().append($("#container1").clone().children());
关于javascript - 如何将div内的内容克隆到其他div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28236705/