Home › Forums › JavaScript › Dark/Light color switch › Reply To: Dark/Light color switch
October 5, 2017 at 3:52 pm
#261058
Shikkediel
Participant
I tried to post a reply but apparently edited too many times. My keyboard when haywire, outputting the wrong characters…
Anyway, the second part of your existing code could be reduced to this:
$('#theme').toggleClass('light dark');
I’ll have to take another look at what you’re trying the do exactly otherwise.