0
Change between Styles with Javascript
How can I change i.e my first css style style1.css to the second one style2.css with Javascript? Is that even possible ? Or would it be "easier" to just change all the lines in style1.css with a script?
1 Answer
+ 2
Okay, I got it, I used this:
HTML:
<link rel="stylesheet" id="pagestyle" href="/styles/style1.css">
JS:
function swapStyleSheet(sheet){
document.getElementById('pagestyle').setAttribute('href', sheet);
swapStyleSheet("/styles/style2.css");
Thanks anyway :)