The more complicated the CSS coding the more complicated selecting elements with jQuert can become.
You may find yourself with a situation such as:
<div class="cOne cTwo"></div>
<div class="cOne cThree"></div>
So how do we select specific elements when all of these div’s contain the class “cOne”? The answer is actually very simple!
You concatenate the classes in your selector such as:
So you may do something like this if you wanted to add a new style to only div’s that have both the class “cOne” and “cThree”:
jQuery("div.cOne.cThree").addClass("superClass");
}
Wow! That’s easy and simple, I can’t believe I never thought of that before! Thanks dude, you’re the man!
Thanks for the very detailed helpful tips on jQuery. I’m pretty new with this tough and I appreciate all the help I get, so THANKS big time! I owe you one!