+ 6

Why isn't this working?

Hello, I have a problem here. Open the sidenav and click on electronics. The .active is supposed to be added and retained. But when the sidenav is closed and opened again the class is removed. What is wrong? Thanks in advance Evans https://code.sololearn.com/WQ383vPhQOMw/?ref=app

19th Apr 2020, 8:57 AM
Evans
Evans - avatar
5 Réponses
+ 3
Evans You forgot to put the # before sidenavLink, by concatenation or template strings.
19th Apr 2020, 10:57 AM
ODLNT
ODLNT - avatar
+ 1
Evans you're welcome
19th Apr 2020, 6:49 PM
ODLNT
ODLNT - avatar
+ 1
https://code.sololearn.com/WC8NpMgM3Rl5/#css check my code for best illastration.
20th Apr 2020, 5:10 AM
Rishabh Rawat
Rishabh Rawat - avatar
0
The class is called .active sidenavLink is the id of electronics
19th Apr 2020, 9:14 AM
Evans
Evans - avatar
0
ODLNT thanks
19th Apr 2020, 4:21 PM
Evans
Evans - avatar