jQuery - get the first class only from a element

The element looks like this:

<li class="blah active"> ... </li>

jQuery.attr('class') will return both classes. How can I get only the 1st class ('blah' in this case) with jQuery?

Answers:

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.