I have the following:
<html lang="en" class="no-js theme-light"> or
<html lang="en" class="no-js xxx yyy theme-light">
I would like to make it so that clicking a link will change this to:
<html lang="en" class="no-js theme-dark">
<html lang="en" class="no-js xxx yyy theme-dark">
Clicking again will change it back. that is remove theme-dark and add theme-light.
Can someone explain how I can do this with jQuery?
$('#sidebar-theme-switch').click(function (e) {
???
});
LIVE DEMO
toggleClass