Get Content and Href of Elements that Have A Certain Class
<p>There is a Div with 9 Spans as its member. 3 of them has "aaa" Class, 3 of them has "bbb" Class, and 3 of them has "ccc" Class. The format is:</p>

<pre><code>    &lt;span class="aaa"&gt;aaa&lt;/span&gt;
    &lt;span class="bbb"&gt;&lt;strong&gt;bbb&lt;/strong&gt;&lt;/span&gt;
    &lt;span class="ccc"&gt;&lt;a href="0.html"&gt;ccc&lt;/a&gt;&lt;/span&gt;

    &lt;span class="aaa"&gt;aaa1&lt;/span&gt;
    &lt;span class="bbb"&gt;&lt;strong&gt;bbb1&lt;/strong&gt;&lt;/span&gt;
    &lt;span class="ccc"&gt;&lt;a href="1.html"&gt;ccc1&lt;/a&gt;&lt;/span&gt;

    &lt;span class="aaa"&gt;aaa2&lt;/span&gt;
    &lt;span class="bbb"&gt;&lt;strong&gt;bbb2&lt;/strong&gt;&lt;/span&gt;
    &lt;span class="ccc"&gt;&lt;a href="2.html"&gt;ccc2&lt;/a&gt;&lt;/span&gt;
</code></pre>

<p>There is also an Unordered List.</p>

<p>What I want is to populate the Unordered List with List Items. The new format of the Unordered List should be like this:</p>

<pre><code>&lt;ul class="container"&gt;
    &lt;li&gt;
        &lt;a href="0.html"&gt;
            aaabbb
        &lt;/a&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href="1.html"&gt;
            aaa1bbb1
        &lt;/a&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a href="2.html"&gt;
            aaa2bbb2
        &lt;/a&gt;
    &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>My code is below, but it doesn't work:</p>

<p><a href="http://jsfiddle.net/Tgser/" rel="nofollow">http://jsfiddle.net/Tgser/</a></p>

<p>How can I format the Unordered List like above?</p>
