0
I would like to know how to do that when the second element from the first ul receive the class ". active" the class image ". img2" receive a class of type "active-image" with pure javascript. Please.
Important: It is not enough to select only the element that has the class . active, but its order. Type: Select element 3 if it has class . active.
<ul>
<li><a href="#">home</a></li>
<li><a href="#">about</a></li>
<li><a href="#">service</a></li>
</ul>
<ul>
<li><img class="img1" src="#"/></li>
<li><img class="img2" src="#"/></li>
<li><img class="img3" src="#"/></li>
</ul>
And what is the condition for the element to receive the class
active
? You already have that part of the code?– Andre
if the second element has the class . active, for example. I don’t know any javascript. rs
– Will