SHARE
TWEET

Untitled

a guest Sep 13th, 2017 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id="dynamicInput">
  2.    <div id="duplicater">
  3.       <input type="text" placeholder="Event Title" name="title">
  4.       <input type="text" placeholder="url" name="url">
  5.    </div>
  6. </div>
  7.    
  8. var i = 0;
  9.   var original = document.getElementById('duplicater');
  10.  
  11.   function duplicate() {
  12.     var clone = original.cloneNode(true);
  13.     clone.id = "duplicate" + ++i;
  14.     original.parentNode.appendChild(clone);
  15. }
RAW Paste Data
Pastebin PRO Autumn Special!
Get 40% OFF on Pastebin PRO accounts!
Top