HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery clone() Method</h1> <p class="point">Try to click on this paragraph as well</p> <button>clone</button> <script> $(document).ready(function(){ $("button").click(function(){ // clone(false) $("p").clone().appendTo("body"); }); $(".point").click(function(){ alert("you clicked"); }); }); </script> </body> </html>
OUTPUT
×

Save as Private