tags:

views:

26

answers:

1

HI,

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. For ex:

I have 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 " " disappear :(, but I need to leave it !

Can You help ME ?

Thanks !!

+1  A: 

I think we can help YOU :)

You'll want to clone the original div:

$(".content").click(function(){
    $(".test").append($(this).clone()); 
});
Ariel
Thanks It help me :)!
Alexander Corotchi