title: How to move an element after another element using JS or jquery?
body: <p>I would like to move one <code>DIV</code> element beside another, it is normally like this:</p>
  
  <pre><code>&lt;div class="box-content-top"&gt;
   &lt;div class="box-related-product-top"&gt;
    &lt;div&gt;  
  
      &lt;div class="price"&gt;
        ...   
      &lt;/div&gt;              
      &lt;div class="image"&gt;
       ...
      &lt;/div&gt;
      &lt;div class="name"&gt;
       ...
      &lt;/div&gt;
      &lt;div class="cart"&gt;
       ...
      &lt;/div&gt;
  
  
     &lt;div&gt;  
  
      &lt;div class="price"&gt;
        ...   
      &lt;/div&gt;            
      &lt;div class="image"&gt;
       ...
      &lt;/div&gt;
      &lt;div class="name"&gt;
       ...
      &lt;/div&gt;
      &lt;div class="cart"&gt;
       ...
      &lt;/div&gt;
  
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to change the position of the <code>div</code> with the class <code>.price</code> to be after the <code>.name</code> class, to look like this:</p>
  
  <pre><code>&lt;div class="box-content-top"&gt;
   &lt;div class="box-related-product-top"&gt;
    &lt;div&gt;  
  
      &lt;div class="image"&gt;
       ...
      &lt;/div&gt;
      &lt;div class="name"&gt;
       ...
      &lt;/div&gt;
       &lt;div class="price"&gt; // HERE
        ...   
      &lt;/div&gt; 
      &lt;div class="cart"&gt;
       ...
      &lt;/div&gt;
  
  
     &lt;div&gt;  
  
      &lt;div class="image"&gt;
       ...
      &lt;/div&gt;
      &lt;div class="name"&gt;
       ...
      &lt;/div&gt;
      &lt;div class="price"&gt; // HERE
        ...   
      &lt;/div&gt; 
      &lt;div class="cart"&gt;
       ...
      &lt;/div&gt;
  
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>