jQuery's attr - return multiple classes not just the 1st.

Posted by nobosh on Stack Overflow See other posts from Stack Overflow or by nobosh
Published on 2010-05-12T16:44:39Z Indexed on 2010/05/12 16:54 UTC
Read the original article Hit count: 150

Filed under:
|
|

Given a div such as:

<div class="widget block dock clock">yada yada</div>

I'd like to be abe to use JQUERY's $(div).attr('class');

to find all the classes, but the JQUERY.attr only return widget. Is there a way with JQUERY to return all the classes defined for the element?

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about attributes