title: How can I remove the input before cloning a div?
body: <p>I've found a few answers to this question on stack overflow, but it's not working for me.
  At the moment, my code looks like this (I removed the other divs so it's not too long to read) :</p>
  
  <pre><code>&lt;div id="dynamicInput"&gt;
     &lt;div id="duplicater"&gt;
        &lt;input type="text" placeholder="Event Title" name="title"&gt;
        &lt;input type="text" placeholder="url" name="url"&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the javascript :</p>
  
  <pre><code>  var i = 0;
    var original = document.getElementById('duplicater');
  
    function duplicate() {
      var clone = original.cloneNode(true);
      clone.id = "duplicate" + ++i;
      original.parentNode.appendChild(clone);
  }
  </code></pre>
  
  <p>It works great, but if I put some text before pressing the button "add event", it also clones the text, and I don't want that. 
  I've tried to add <code>.find('input').val('')</code> on the first line, but it's not working, I can't even clone anymore. The error in my console is <code>method find not found</code>.</p>
  
  <p>The same thing happens with all the solutions I've found on the forum : or it disabled the button and I can't duplicate anymore, or it works but clones the text. </p>
  
  <p>How can I do this?</p>
  
  <p>Thanks for your help !!</p>