get all the classes of an element with specific class using javascript
<p>Trying to get the previous class of an elements using JavaScript.</p>

<pre><code>&lt;li class="dynamic_class second_dynamic_class xx "&gt;&lt;/li&gt;
&lt;li class="dynamic_class second_dynamic_class"&gt;&lt;/li&gt;
</code></pre>

<p>I want to put into a var and compare the <code>dymanic_class</code> of the <code>&lt;li&gt;</code> with the <code>class="xx"</code>.</p>

<p>ONLY pure JavaScript allowed !</p>

<p>Further Details:</p>

<pre><code>&lt;li class='day_1 24.02.2013' data-name='day_1 24.02.2013' &gt;
more code
&lt;/li&gt;
&lt;li class='day_2 25.02.2013 today' data-name='day_2 25.02.2013' &gt;
more code
&lt;/li&gt;
&lt;li class='day_3 26.02.2013' data-name='day_3 26.02.2013' &gt;
more code
&lt;/li&gt;
&lt;li class='day_4 27.02.2013' data-name='day_4 27.02.2013' &gt;&lt;/li&gt;
</code></pre>

<p>First I need to select the &lt; li> with the class today than read the "previous" &lt; li> class of the same element, i need to obtain the class="day_1" into a var.</p>
