+ 2

Help! Basic Theme changer is not working

So I took a basic java script class and tried to made this theme toggler but it isn't working properly nothing happens when I click the button Kindly suggest improvements Here is the code 😊 https://code.sololearn.com/WijXlASh0w72/?ref=app

8th Apr 2022, 8:54 AM
Ashish Sharma
Ashish Sharma - avatar
3 ответов
+ 2
For your javascript classList.toggle(“.black”) get rid of that period and make it toggle(“black”)
8th Apr 2022, 12:40 PM
Junior
Junior - avatar
+ 1
It was showing some kind of error
8th Apr 2022, 8:54 AM
Ashish Sharma
Ashish Sharma - avatar
+ 1
Thanks it works now....
8th Apr 2022, 1:23 PM
Ashish Sharma
Ashish Sharma - avatar