Dynamic CSS Switching using Javascript...
Dynamic CSS Switching using Javascript...
Out of context: Reply #3
- Started
- Last post
- 5 Responses
- neverblink0
yes, pretty simple actually.. (I'll asume it's the background image of the body you'll want to switch)
// get what day of the week it is
var d=new Date();switch(d){
case(0): // sunday
document.body.style.backgroundIm... = "url('sunday.jpg')";
break;
case(1): // monday
document.body.style.backgroundIm... = "url('monday.jpg')";
break;
// etc. for the rest of the days of the week.
}