jQuery .clone() Examples

Welcome To jQuery !!
+_+
Example 1
Image clone
View
Source
<style type="text/css">
    .css_test img {
        border-radius:5px;
        margin:3px;
        width:200px;
    }
</style>

<button type="button" onclick="$('.css_test img:last').clone().appendTo( $('.css_test') )">Click !!</button>

<div class="css_test"><img src="http://cfile30.uf.tistory.com/image/264EA84C550B9B3B05A8BB" /></div>
jQuery

$( selector ).clone()

Example 2
View
Source
<style type="text/css">
    .css_test img {
        border-radius:5px;
        margin:3px;
        width:200px;
        position:relative;
    }
</style>

<button type="button" onclick="j_test()">Click !!</button>

<div class="css_test al"><img src="http://cfile26.uf.tistory.com/image/2509693354D74FB5036873" /></div>

<script type="text/javascript">
    function j_test(){
        $('.css_test img:first')
        .clone()
        .fadeTo(0)
        .css( { top:-400, left:-400 } )
        .appendTo( $('.css_test') )
        .animate({ top:0, left:0, opacity:1 }, 1000)
    }
</script>
jQuery .clone() Documentation : http://api.jquery.com/clone/