title: Show and Hide div based on day and time
body: <p>I want to show and hide div based on day and time. 
  I have not much experience with PHP, but I think I found a code for this. But I don't know how to sort and how the codes shall be set up. </p>
  
  <p><strong>I want it to show like this during opening hours:</strong> 
  <a href="http://boxmedia.no" rel="nofollow">http://boxmedia.no</a> (bottom of frontpage). </p>
  
  <p>It's a form with one field and one button. It's in Norwegian and says: 
  Fill in your number here. And press here, then we call you back in 10 mins</p>
  
  <p><strong>This is the code for the form:</strong></p>
  
  <pre><code>&lt;div class="container"&gt; &lt;div class="row-centered main-btn ring_me"&gt; 
  &lt;?php 
  echo do_shortcode('[contact-form-7 id="249" title="Untitled"]'); 
  
  ?&gt; &lt;/div&gt; &lt;!--div class="row-centered sec-btn" style="display:none;"&gt;
  &lt;span&gt;&lt;input max-size="30" type="text" id="contact_no" name="contact_no"/&gt;
  &lt;/span&gt;&lt;span class="btn btn-success btn-lg"&gt;
  &lt;font&gt;&lt;font class="goog-text-highlight"&gt;
  &lt;a href="&lt;?php echo home_url(); 
  
  ?&gt;/kontakt-oss"&gt;Send &lt;/a&gt; &lt;/font&gt;&lt;/font&gt; &lt;/span&gt;&lt;/div--&gt; &lt;/div&gt;
  </code></pre>
  
  <p>And this is the code I think will make it show during opening hours: 8am to 4pm. 
  And not in weekends.</p>
  
  <p><strong>But where do I put this in the existing code above:</strong> </p>
  
  <pre><code>&lt;?php date_default_timezone_set('Europe/Oslo');
  $currentHour = date("H");
  $openTime = 8;
  $closeTime = 16;
  if ($currentHour &gt;= $openTime &amp;&amp; $currentHour &lt; $closeTime){
        $css = 'display:block;';
  }else{
        $css = 'display:none;';
  }
  
  echo '&lt;style type="text/css"&gt;.timeBasedLink {'.$css.'}&lt;/style&gt;'; ?&gt;
  
  
  if (date("w") == 0 || date("w") == 6 || $currentHour &lt; $openTime || 
  $currentHour &gt;= $closeTime)
  
  {
      $css = 'display:none;';
  }
  else
  {
      $css = 'display:block;';
  }
  </code></pre>
  
  <p>--------------- Added February 2. 2015 ---------------</p>
  
  <p>And is this the code to add to my css file?
  And is it placed correctly? 
  Is the class .TimeOn ?
  How I can connect the TimeOn to ring_me or what the class is called?</p>
  
  <pre><code>.ring_me input[type="tel"] {
      width: 258px;
      margin-right: 20px;
  .timeOn {
  display:block;
  }
  .timeOff {
  display:none;
  }
  }
  </code></pre>
  
  <p>And this is another place in the CSS: </p>
  
  <pre><code>.ring_me input[type="tel"] {
  .timeOn {
  display:block;
  }
  .timeOff {
  display:none;
  }
  font-size: 20px;
  line-height: 24px;
  </code></pre>