I would like to add a class (class=\"bbox\") to a ul-list but only if no class exists.
This is what i have so far. How do I check with jquery if a class exists in the ul-tag
You match the tag with absolute no classes, and if ul had other classes the matching wouldn't be made. You got to search for the exactly class you wish to add. Like .hasClass aproach.