Determine if object has class

I have a toggle link object that have a class " selected " present or not present.

How can I verify on this object if the class is present or not ?[WebUI]+Get+Attribute

Seems the above will get the whole class string, but it’s a start.

I did make 2 button object, one with the hasClass function and the other without