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…
April 5, 2015 at 9:26 am
#199775
css_fan5
Participant
No. My previous nav was structured as several “a” links wrapped inside a div with id of “navi”. It was looping through all the a tags inside the #navi div and making the comparison.
The problem occurred when I placed these a tags inside li tags. Based on the HTML I have posted, how can I loop through the a tags and apply the class active? Do you have any suggestions???