title: How does one change the colour of a div based on current time?
body: <p>I have javascript code that converts the color of the body based on current time but I need it to change the color of a div instead. I am not knowledgeable enough in javascript to know how to do this. I know I need to add a div to the html. The main code is bigger but I've just pulled the basics to get it to work.</p>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>function emea() {
    var d = new Date();
    var n = d.getUTCHours()+1;
  
    if (n &gt; 18 || n &lt; 9) {
      // If time is after 6PM or before 9AM, apply night theme to 'body'
      document.body.className = "emeanight";
    }
    else {
      // Else use ‘day’ theme
      document.body.className = "emeaday";
    }
  }
  
  $(document).ready(function() {
    emea();
  });
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;link rel='stylesheet' type='text/css' href='tz.css'&gt;
      &lt;script src='https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'&gt;&lt;/script&gt;
      &lt;title&gt;TZ TEST&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script src='tz.js'&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>CSS</p>
  
  <pre><code>.emeaday
  {
  background-color:green;
  }
  
  .emeanight
  {
  background-color:blue;
  }
  </code></pre>
  
  <p>I have tried variations of document.getelementbyid but I keep hitting a blank.</p>