title: Cloning contents that are different in each div
body: <p>I know how to clone contents from one div to another but I'm having a problem where it clones the first div and then copies them to others. My PHP code looks like this:</p>
  <pre><code>&lt;div&gt;
  &lt;div class=&quot;mobile-top&quot;&gt;&lt;/div&gt;
  &lt;div class=&quot;post-date&quot;&gt;May 11, 2021&lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;div class=&quot;mobile-top&quot;&gt;&lt;/div&gt;
  &lt;div class=&quot;post-date&quot;&gt;May 10, 2021&lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;div class=&quot;mobile-top&quot;&gt;&lt;/div&gt;
  &lt;div class=&quot;post-date&quot;&gt;May 9, 2021&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>And my jQuery code clones the first <code>.post-date</code> and then copies that date to the rest. It looks like this:</p>
  <pre><code>&lt;div&gt;
  &lt;div class=&quot;mobile-top&quot;&gt;May 11, 2021&lt;/div&gt;
  &lt;div class=&quot;post-date&quot;&gt;May 11, 2021&lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;div class=&quot;mobile-top&quot;&gt;May 11, 2021&lt;/div&gt;
  &lt;div class=&quot;post-date&quot;&gt;May 10, 2021&lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
  &lt;div class=&quot;mobile-top&quot;&gt;May 11, 2021&lt;/div&gt;
  &lt;div class=&quot;post-date&quot;&gt;May 9, 2021&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Any ideas on how to clone <code>.post-date</code> of each <code>&lt;div&gt;</code> and copy them to <code>.mobile-top</code>. It should be a 1-1 match so the date of each post should be copied to <code>.mobile-top</code></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>jQuery(document).ready(function($){
      var date = $('.post-date').html();
      $(".mobile-top").show().html(date);
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.mobile-top {color:red}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div&gt;
    &lt;div class="mobile-top"&gt;&lt;/div&gt;
    &lt;div class="post-date"&gt;May 11, 2021&lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;div class="mobile-top"&gt;&lt;/div&gt;
    &lt;div class="post-date"&gt;May 10, 2021&lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;div class="mobile-top"&gt;&lt;/div&gt;
    &lt;div class="post-date"&gt;May 9, 2021&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>