I'm trying to use JQuery to loop through several div's with more than one class name, that all have the same first css class name and each one has a different second class name, e.g.
<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>
In JQuery I have tried
$(".mainText").each(function (i)
$(".mainText.*").each(function (i)
$(".mainText" *).each(function (i)
$(".mainText .*").each(function (i)
But it will not select any of the divs with class="mainText ..."
thanks for 开发者_运维问答considering the question.
Try $('.maintext').each instead. Class names are case-sensitive. 
jQuery selectors are case sensitive. You have maintext in your HTML but mainText in the jQuery selector.
$('.maintext').each
Should work.
in your question, the HTML says maintext and the JS uses mainText (capital T).
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论