I'm trying to run a popup on my website just during specific times(11 am to 2 pm - client side/server side either). I'm using getHours() to check the current time, but something is wrong - the popup seems to not recognize the condition. Below is the code -
<script type="text/javascript">
var now = new Date();
if (now.getHours() > 11 && now.getHours() < 14)
{
//popup code
}
</script>
Thanks!