jQuery - get a list of values of an attribute from elements of a class

Posted by Ankur on Stack Overflow See other posts from Stack Overflow or by Ankur
Published on 2010-05-02T15:58:16Z Indexed on 2010/05/02 16:07 UTC
Read the original article Hit count: 195

Filed under:
|

I have a class called object which has an element called 'level'. I want to get a list of all the different values of level on the page so I can select the highest one.

If I do something like:

$(".object").attr("level")

will that get me a list of values that are the values of the level attribute? I suspect not, but then how do you do something like that.

Note: I don't want to select an HTML object for manipulation as is more common, rather I want to select values of the attribute.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about selectors