title: How can I duplicate a div onclick event?
body: <p>I want a div to be duplicated when a button is clicked. I though something like this; but it's not working. Can anyone help me?</p>
  <p>HTML</p>
  <pre><code>&lt;div id=&quot;duplicater&quot;&gt; 
  duplicate EVERYTHING INSIDE THIS DIV
  &lt;/div&gt;
  </code></pre>
  <p>JAVASCRIPT</p>
  <pre><code>function duplicate()
  {
  var div = duplicate(&quot;div&quot;);
      div.id = &quot;duplicater&quot;;
  div.appendChild(duplicate(&quot;duplicater&quot;));
  }
  </code></pre>