Mega Code Archive

 
Categories / JavaScript Tutorial / JQuery
 

Create a button thats able to clone itself - and have the clones themselves be clonable

< html>   <head>     <script type="text/javascript" src="js/jquery-1.3.2.js"></script>     <script type="text/javascript">         $(document).ready(function(){              $("button").click(function(){                  $(this).clone(true).insertAfter(this);              });         });     </script>   </head>   <body>     <body>             <button>Clone Me!</button>                       </body> </html>