Skip to content
Advertisement

Nav bar Active tab color change

My code is not working I don’t know why?

someone, please help me out.

I am not able to add a class name to the active nav bar

JavaScript

css

JavaScript

javaScript

JavaScript

Advertisement

Answer

1) You have to use . for class selector as:

JavaScript

2) You have to use add method to add a new class as:

JavaScript

JS

JavaScript

Also, there is a typo in your current code: lenght instead of length

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement