Sorting DIVs with an already sorted array
<p>I'm new here and new to Javascript and web programming (I actually know a little bit of Java not for web). So here's the problem I have an array of strings (name of Albums to be more specific) and I actually sorted this array according to the Album names.
Now that I have this array sorted my next step would be sort the DIVs that represent each Album, but I actually don't know how to do it with JQuery.
Here's how my DIVs are distribuited in the page:</p>

<pre><code>&lt;div id="products" &gt;
   &lt;div class="line"&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="line"&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="line"&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="line"&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
      &lt;div id="product-Album-name"&gt;&lt;/div&gt;
   &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>My goal is to sort all the DIVs with id="product-Album-name".
Any suggestions?
Thank you in advance.</p>
