Here is a lovely example to explain
$( ".hello" ).appendTo( ".goodbye" );
Will result in :
AND
$( ".hello" ).clone().appendTo( ".goodbye" );
Result in
Done :)
<div class="container">
<div class="hello">Hello</div>
<div class="goodbye">Goodbye</div>
</div>
$( ".hello" ).appendTo( ".goodbye" );
Will result in :
<div class="container">
<div class="goodbye">
Goodbye
<div class="hello">Hello</div>
</div>
</div>
AND
$( ".hello" ).clone().appendTo( ".goodbye" );
Result in
<div class="container">
<div class="hello">Hello</div>
<div class="goodbye">
Goodbye
<div class="hello">Hello</div>
</div>
</div>
Done :)
Comments
Post a Comment