Marquis
01-23-2014, 12:18 AM
Hi, i need help with following script wich i use to to display different content depending on the time of day. But between 0 and 1 nothing is displayed. Whats wrong?
function goto(){
var today=new Date();
var hour=today.getHours();
if((hour>0) && (hour<=11)){
}
else if((hour>11) && (hour<=18)){
}
else if((hour>18) && (hour<=0)){
}
}
goto();
function goto(){
var today=new Date();
var hour=today.getHours();
if((hour>0) && (hour<=11)){
}
else if((hour>11) && (hour<=18)){
}
else if((hour>18) && (hour<=0)){
}
}
goto();