假设我有以下标记
<div id="test">
<div class="original">hi</div>
<div class="news"></div>
<div class="duplicate"></div>
</div>
现在我想将其删除original
并粘贴到duplicate
结果应该是这样的
<div id="test">
<div class="news"></div>
<div class="duplicate"><div class="original">hi</div></div>
</div>
我试过这样
var orig = $('.original');
orig.remove().clone(true).appendTo('.duplicate'); // but not working