jQuery - sort DIVs by className
<p>I have a list of DIVs, like this :</p>

<pre><code>&lt;div id="list"&gt;
    &lt;div class="cat1-4.2"&gt;&lt;div&gt;4&lt;/div&gt;&lt;/div&gt;
    &lt;div class="cat3-3.3"&gt;&lt;div&gt;3&lt;/div&gt;&lt;/div&gt;
    &lt;div class="cat2-5.1"&gt;&lt;div&gt;5&lt;/div&gt;&lt;/div&gt;
    &lt;div class="cat3-1.5"&gt;&lt;div&gt;1&lt;/div&gt;&lt;/div&gt;
    &lt;div class="cat3-2.4"&gt;&lt;div&gt;2&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>and I want to sort them, using jQuery</p>

<p>Server-side, I can define the wanted order, and include this order in the class names :</p>

<p>catX-<strong>4.2</strong></p>

<p>I want to be able to call either the first order (in my example this DIV will be in the 4th position), or the second order (it will be in the 2nd position) : that explains the "4.2"</p>

<p>So if I call <code>OrderDIV(1)</code> I will have this :</p>

<pre><code>1
2
3
4
5
</code></pre>

<p>and if I call <code>OrderDIV(2)</code> I will have this :</p>

<pre><code>5
4
3
2
1
</code></pre>

<p>(I will need to add more orders, like : catX-4.2.5.6.2)</p>

<p>Thank you VERY MUCH for your help!</p>
