jQuery clone() Method

By: Bipin C Mathew 1 year, 5 months ago

The clone is a Jquery HTML/CSS Method. It is used to make copies of element. We can also make copies of child nodes with texts and attributes with clone method.



Parameter: It accepts an optional parameter which could be either true or false specifies that event handler should be copied or not.



	<script src="https://ajax.googleapis.com/ajax/libs/ 
	<!--In this example no parameter is passing to the 
		clone method-->
		$(document).ready(function() { 
			$("button").click(function() { 

	<p>Welcome to</p> 
	<p>Atemon !!!</p> 
	<!--click on this method and see the clone element-->
	<button>Click Me!</button> 



Let us talk!

We take the vision which comes from dreams and apply the magic of science and mathematics, adding the heritage of our profession and our knowledge to create a design.