Adding classes to list items based on theirs child's ID's
<p>I was wondering how to achieve something like this using jQuery:</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a href="#id-220" class="id-220 id-320 id-321 id-322"&gt;Nunc tincidunt&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#id-320" class="id-320 id-321 id-322"&gt;Proin dolor&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#id-321" class="id-321 id-322"&gt;Aenean lacinia&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#id-322" class="id-322"&gt;Aenean lacinia&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>If I have only this:</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a href="#id-220"&gt;Nunc tincidunt&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#id-320"&gt;Proin dolor&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#id-321"&gt;Aenean lacinia&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#id-322"&gt;Aenean lacinia&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>So, basically I want that each list item is looking for its sibling's ID and add them by order as class. First list item has 3 siblings, and by that it must have 4 classes (his own and 3 from siblings) and so on ... I hope that I explained it well... TNX!</p>
