title: How to clone each div individually respective of the parent
body: <p>The target is to clone the a tag to my snippet. The problem is that, all the cloned elements are sitting in the same div, instead of their respective divs.</p>
  
  <p>I have tried to loop them but every cloned is sitting on the same div.</p>
  
  <pre><code>&lt;div class="product_image_wrapper"&gt;
      &lt;a href="socks.html"&gt;
      &lt;img src="socks.jpg"&gt;
      &lt;/a&gt;
      &lt;div class="mysnippet"&gt; // The objective here is that while we hover image above, then 'view product' will be shown. If user click, it will redirect to that a link. 
          &lt;div class="myview"&gt;
              &lt;a href="#"&gt;View product&lt;/a&gt; // The a tag with socks.html should be cloned here
          &lt;/div&gt; 
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="product_image_wrapper"&gt;
      &lt;a href="jean.html"&gt;
      &lt;img src="jean.jpg"&gt;
      &lt;/a&gt;
      &lt;div class="mysnippet"&gt; // Likewise this mysnippet should clone only the a tag that's it's under. 
          &lt;div class="myview"&gt;
              &lt;a href="#"&gt;View product&lt;/a&gt; // The a tag with jean.html should be cloned here
          &lt;/div&gt; 
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="product_image_wrapper"&gt;
      &lt;a href="socks.html"&gt;
      &lt;img src="socks.jpg"&gt;
      &lt;/a&gt;
      &lt;div class="mysnippet"&gt; 
          &lt;div class="myview"&gt;
              &lt;a href="#"&gt;View product&lt;/a&gt;
              &lt;a href="socks.html"&gt;&lt;img src="socks.jpg"&gt;&lt;/a&gt;
          &lt;/div&gt; 
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="product_image_wrapper"&gt;
      &lt;a href="jean.html"&gt;
      &lt;img src="jean.jpg"&gt;
      &lt;/a&gt;
      &lt;div class="mysnippet"&gt; 
          &lt;div class="myview"&gt;
              &lt;a href="#"&gt;View product&lt;/a&gt;
              &lt;a href="jean.html"&gt;&lt;img src="jean.jpg"&gt;&lt;/a&gt;
          &lt;/div&gt; 
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>