Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Can´t apply active class to sublinks on my page… Reply To: Can´t apply active class to sublinks on my page…

#199758
css_fan5
Participant

Hello,

I am trying to apply “active” class to the active navigation item. My current JS code loops through the “a” links and it worked before but now I have modified my navigation so each a tag is inside another “li” tag and the script doesn’t loop through properly. JS selector needs to be modified but I don’t know how to do it. Hopefully it is bit more clear now.

Thanks…