javascript - How do you make themes on a website using multiple changing stylesheets? -


i have github pages site made scratch. want make themes user can choose on site radio buttons. so, made 2 different css stylesheets called darktheme.css , lighttheme.css. if had 1 stylesheet, link in head. in case have 2. have 2 major questions.

<input name="theme" value="darktheme" id="darktheme" type="radio" checked/> <p>dark</p> <br> <input name="theme" value="darktheme" id="darktheme" type="radio" /> <p>dark</p> 

so, want theme dark if variable called theme = "dark"; also, theme becomes dark when first radio button checked. , vise-versa.

try using alternate stylesheet.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -