jQuery clone method

jQuery provides clone() method which  is used to create a copy of the matched elements.

<button id="cloneButton1">clone()</button>
<script type="text/javascript">
    $("#cloneButton1").click(function () {
<div class="smallBox">
	I'm a small box
	<div class="smallInnerBox">I'm a small small inner box</div>
For Live demo
Example 2 :
     return false;
<div id="dvText">
   jQuery By Example Rocks!!!
<input type="button" id="btnClone" value="Clone Div" />
Share this nice post:

One thought on “jQuery clone method

Comments are closed.