title: jquery move element to last child position
body: <p>Let's say I have a <code>&lt;div&gt;</code> that contains some random elements, but there is one element I've created with this unique selector : <code>$('.myUniqueElement')</code>. I want to use <code>.insertAfter()</code> to move this element at last child position in my <code>&lt;div&gt;</code> is that possible ? what is the solution ?</p>
  
  <p>This is my solution: <a href="http://jsfiddle.net/silverlight/RmB5K/3/" rel="noreferrer">http://jsfiddle.net/silverlight/RmB5K/3/</a> is this OK ??</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class='p'&gt;
      &lt;div class='myUniqueElement'&gt;unique&lt;/div&gt;
      &lt;div&gt;item&lt;/div&gt;
      &lt;div&gt;item&lt;/div&gt;
      &lt;div&gt;item&lt;/div&gt;
  &lt;/div&gt;
  &lt;input type='button' id='b' value='Do'/&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>$('#b').on('click',function(){
      $('.myUniqueElement').insertAfter($('.p :last-child'))
  });
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.myUniqueElement{color:red;}
  </code></pre>