<script type="text/javascript">
$(function() {
var hours = new Date().getHours();
var minutes = new Date().getMinutes();
console.log(hours);
console.log(minutes);
if(hours >= 10 && minutes >=30) {
$("#enableOvertime").hide(); // button not hiding
}
});
</script>
<button type="submit" id="enableOvertime">Enable Overtime </button>
I'm currently not getting what is the error with it. using console.log display the correct time and minutes. butid does not hide the button. I want hide the button after 10:30 am every day. any help would be appreciated.