I would like to do something with several div’s inside ul li: JsFiddle
I’m trying to do nothing if one of the ul li div’s has a class .Class How can I change this code so that nothing happens UNLESS none of the div’s have a class?
As you can see now the last li is red, but it shouldn’t because the second div has class .Class
You can always test for the existence of elements before calling out to style it: