How to change just the div's background-color and not the entirely body-color?


#1


#2

Hi there charlms350,

change this…

  var 
    hr = (new Date()).getHours(),
    body = document.body,
    bstyle = body.style,    
    hello = document.querySelector(".hello");

…to this…

  var
    hr = new Date().getHours(),
    hello = document.querySelector(".hello"),   
    bstyle = hello.style; 

coothead