title: Using jQuery's clone instead of replaceWith
body: <p>I'm using the code below to replace <code>.div1</code> with <code>.div2</code>.</p>
  
  <p><code>$('.div1').replaceWith( $( '.div2' ) );</code></p>
  
  <p>However, I would like to create a copy of <code>.div2</code> instead of taking it out of its place in the DOM. So I tried cloning the element like this, but nothing got cloned and now the two divs weren't even being replaced. Is there something wrong with the code?</p>
  
  <p><code>$('.div1').clone().replaceWith( $( '.div2' ) );</code></p>