How to reorder divs based on class names using Javascript
<p>Here is my HTML</p>

<pre><code>&lt;div id="subscriptionContainer"&gt;

&lt;div class="subscription"&gt;
  &lt;div class="subs-btn"&gt;
        &lt;div class="subscribed"&gt;Subscribed&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class="subscription"&gt;
  &lt;div class="subs-btn"&gt;
        &lt;div class="btnGetit"&gt;Get It&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class="subscription"&gt;
  &lt;div class="subs-btn"&gt;
        &lt;div class="subscribed"&gt;Subscribed&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class="subscription"&gt;
  &lt;div class="subs-btn"&gt;
        &lt;div class="btnGetit"&gt;Get It&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class="subscription"&gt;
  &lt;div class="subs-btn"&gt;
        &lt;div class="subscribed"&gt;Subscribed&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class="subscription"&gt;
  &lt;div class="subs-btn"&gt;
        &lt;div class="btnGetit"&gt;Get It&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;
</code></pre>

<p>Now I want to rearrange the "subscription" divs withing the "subscriptionContainer" such that the divs that have class = "subscribed" should be moved to bottom and the divs having class = "btnGetit" should all be moved up. Please give solutions in Javascript or JQuery.</p>
