I've got some code that I thought should work to show or hide two divs depending on the time of day. It currently shows the "closed" div despite the time being later than it is - am I missing anything? The website is running on only two machines so it only needs to get the time set on them.
$(document).ready(function () {
var d = new Date();
var time = d.getHours() + ":" + d.getMinutes();
if (time > ("08:29") && time < ("16:29")) {
$('.hours').show();
$('.closed').hide();
}
else {
$('.hours').hide();
$('.closed').show();
}
});