JQuery - Wrap divs in groups of 50 after sorting
<p>I have the following html :</p>

<pre><code>&lt;div class="backpack_all"&gt; //wrapper for all on screen content
    ...
    &lt;div class="backpack"&gt; //main content to display
        &lt;div class="item1"&gt;
        &lt;div class="item2"&gt;
        &lt;div class="item3"&gt;
        ...etc
</code></pre>

<p>I will have anywhere from 200-500 items in this format. I'm also actively sorting this data by various attributes on these items. When unsorted, they are partitioned in sets of 50 by a class="backpack_partition" which wraps around 50 items. To sort them I have to unwrap all items from their respective partitions. How can I use jquery/javascript to rewrap them? </p>
