trying to show a message on the header of my site where should change everyday base on the date. using script below but seems that its not calling the var. as it shows nothing, I don't know which one is miss out on this.
<script type="function/javascritp">
function unhide(id) {
var element = document.getElementById(id);
element.className = element.className.replace('hidden', '');
}
switch((new Date()).getDay()) {
case 0:
// Sunday
unhide('sun');
break;
case 1:
// Monday
unhide('mon');
break;
case 2:
// Tuesday
unhide('tues');
break;
case 3:
// Wednesday
unhide('wed');
break;
case 4:
// Thursday
unhide('thurs');
break;
case 5:
// Friday
unhide('fri');
break;
case 6:
// Saturday
unhide('sat');
break;
};
</script>
</head>
<body>
<Header>
<div id="sun" class="hidden">Today is Sunday</div>
<div id="mon" class="hidden">Today is Monday</div>
<div id="tues" class="hidden">Today is Tuesday</div>
<div id="wed" class="hidden">Today is Wednesday</div>
<div id="thurs" class="hidden">Today is Thursday</div>
<div id="fri" class="hidden">Today is Friday</div>
<div id="sat" class="hidden">Today is Saturday</div>
</header>
</body>
Im using css code,
.hidden {
display: none;
}