Windows gadget - javascript changing CSS -
i'm working on schedule school on windows desktop. have issue changing, because value of "getday" still on 0 , display default.css.
here check 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? :-)
use "==" in ifs:
if (currday == 0)...
Comments
Post a Comment