I'm working on schedule to school on the Windows desktop. I have issue with changing, Because the value of "getDay" is still on 0 and display default.css.
Here check my code:
var currDate = new Date();
var currDay = currDate.getDay();
var newCSS = "default.css";
if (currDay = 0) newCSS = "default.css";
if (currDay = 1) newCSS = "pondeli.css";
if (currDay = 2) newCSS = "utery.css";
if (currDay = 3) newCSS = "streda.css";
if (currDay = 4) newCSS = "ctvrtek.css";
if (currDay = 5) newCSS = "patek.css";
if (currDay = 6) newCSS = "default.css";
document.getElementById('siteCSS').href = newCSS;
Whats wrong? :-)