How can I utilize JQuery to iterate through multiple div elements with more than one class name, where they all share a common first class name but each has a unique second class name? For example:
<div class="maintext blue"> </div>
<div class="maintext purple"> </div>
<div class="maintext chartreuse"> </div>
<div class="maintext puce"> </div>
<div class="maintext lime"> </div>
I've attempted the following in JQuery:
$(".mainText").each(function (i)
$(".mainText.*").each(function (i)
$(".mainText" *).each(function (i)
$(".mainText .*").each(function (i)
However, none of these methods seem to select any of the divs with class="mainText ..."
Thank you for taking this question into consideration.