jQuery - Move element inside a sibling
<p>I want to move an element to a sibling.</p>

<p>I the example below, I want to move all <code>.i-want-to-be-your-child</code> elements to be inside the sibling <code>.come-to-me</code>.</p>

<p><br>
<strong>Original HTML</strong></p>

<pre><code>&lt;div&gt;
  &lt;a href="#" class="come-to-me"&gt;Welcome!&lt;/a&gt;
  &lt;span class="i-want-to-be-your-child"&gt;Thank you!&lt;/span&gt;
&lt;/div&gt;

&lt;div&gt;
  &lt;a href="#" class="come-to-me"&gt;Welcome!&lt;/a&gt;
  &lt;span class="i-want-to-be-your-child"&gt;Thank you!&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p><br>
<strong>I want the end result to be</strong></p>

<pre><code>&lt;div&gt;
  &lt;a href="#" class="come-to-me"&gt;Welcome!&lt;span class="i-want-to-be-your-child"&gt;Thank you!&lt;/span&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;div&gt;
  &lt;a href="#" class="come-to-me"&gt;Welcome!&lt;span class="i-want-to-be-your-child"&gt;Thank you!&lt;/span&gt;&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p><br>
<strong>jQuery</strong></p>

<pre><code>$(document).ready(function() {
  $('.i-want-to-be-your-child').detach().appendTo($(sibling('.come-to-me')));
  //$('.i-want-to-be-your-child').appendTo($(this).parent().child('.come-to-me'));
});
</code></pre>

<p>What am I doing wrong? What is the best way to achieve this?</p>

<p><a href="https://jsfiddle.net/graphic_dev/9ajhqnzz/1/" rel="nofollow">jsfiddle</a></p>