JQuery select based on the FIRST in a string of classes
<p>I've got two elements which are the basis of a small tab script. For various reasons (called Internet Exploder 6) I've had to build it like this:</p>

<p><strong>Tab headers</strong></p>

<pre><code>&lt;span class="Block1 inactive" id="Tab1"&gt;Label1&lt;/span&gt;
&lt;span class="Block2 inactive" id="Tab2"&gt;Label2&lt;/span&gt;
&lt;span class="Block3 inactive" id="Tab3"&gt;Label3&lt;/span&gt;
</code></pre>

<p><strong>Tab contents</strong></p>

<pre><code>&lt;div class="contents inactive" id="Block1 "&gt;Stuff here&lt;/div&gt;
&lt;div class="contents inactive" id="Block2 "&gt;Stuff here&lt;/div&gt;
&lt;div class="contents inactive" id="Block3 "&gt;Stuff here&lt;/div&gt;
</code></pre>

<p>So when Tab1 is clicked my script needs to get class of "Block1" and then search for the div with the matching class or ID.</p>

<p>But how can I select for the first class in a set of multiple classes? Is there anything along these lines? Is this even possible?</p>

<pre><code>var tabtoshow = $(this).attr('class':first);
var tabtoshow = $(this).attr('class:first');
var tabtoshow = $(this).attr('class[0]');
</code></pre>

<p>Stuck...</p>

<p>Thanks!</p>
