Nov 19, 2014

Cloning Using jQuery

The following piece of code can be used to clone using jQuery:

$("#cloneElement").clone().appendTo("#clonePasteElement");

Copy Paste This Code Below And Simply Do What Ever Your Planning To Do With It

<!DOCTYPE html>
<html>
<head>
<title>Cloning</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("#cloneElement").clone().appendTo("#clonePasteElement");
  });
});
</script>
</head>
<body>

<div id="cloneElement">( This Text Will Be Cloned )</div >
<br>
<div>Copied Text Will Be Pasted Below</div >
<br>
<hr>
<div id="clonePasteElement"></div>
<hr>
<button>Clone</button>

</body>
</html>

No comments:

JWT Token Decode Using Jquery

When it come to authentication we use many mechanism. Ones the user authenticated we must keep these details somewhere safe. So we can share...