selecting the first of multiple classes
- by gleddy
Not sure if you can do this, but I want to select the first of two classes of an element with jQuery and return it's first class only.
<div class="module blue">
I want to return 'module'.
tried this:
var state = $('body').attr('class').first();
but none of that seems to work, thanks for any advice.