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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -