Show content for specific time period

Hi,

I would do it like this:

window.setInterval(function() {
  var d = new Date();
  if (d.getHours() > 12 && d.getHours() < 15) { // if it's after 1pm but before 3pm
    $('div').show();
  } else {
    $('div').hide();
  }
}, 1000 * 60) // this will run every minute

This uses setInterval to run a check every minute and hide or show the content accordingly.