How can I select one particular class in an element with many ones ? Here's my problem :
<div class="oneclass secondclass theclass otherclass"></div>
And in my javascript :
var theclass = this.className; // This part must be changed
var otherclass = this.className; // This one too
if (otherclass == "value" ) {
for (n = 1 ; n < mytab.length ; n ++) { if (mytab[n].name == theclass) { ... } }
}
I have an onclick function that needs to compare the classes myclass and minorclass, the two others aren't important. One more thing, because I need to compare the classes, I don't know the name of minorclass and theclass (and oneclass may not be the same, too)