This is the result of a previous question that seems to have confused people, so I’ll clean it up a bit. Here is some markup.
<div class="button width120 height30 iconLeft colorRed"></div>
<div class="button width180 height20 iconPlus colorBlue"></div>
<div class="button width200 height10 iconStar colorGreen"></div>
<div class="button width110 height60 iconBack colorOrange"></div>
The challenge is to populate the code as follows.
$(".button").each(function(){
});
Now I know that you should not use classes in such a way that I do not look for alternative ways to do this, this is an experiment, and I am interested to know if it is possible to do so.
source
share