Jquery HTML(), clone
I have a quick question should be easy, but need to make it fast
I want to take with jquery one div and to put this div in another one, but the first one should be.
I have this HTML
<div class="content">Some text</div>
I want to put this content in another div
<div class="test"> content div should be here </div>
Jquery styff :
$(".content").click(function(){
$(".test").html($(this));
});
But after that the original &l开发者_开发技巧t;div class="content">
disappears, but I need to leave it.
You'll want to clone the original div:
$(".content").click(function(){
$(".test").append($(this).clone());
});
精彩评论