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
I was wondering this would work fine -->
$("ul").removeClass("bbox").addClass("bbox");
$("ul").removeClass("bbox").addClass("bbox")
First it will remove if there is any and then add new one . Worked best for me as i am too lazy to type all that if thingy.
if