Showing button at certain time
by chridam
HTML
<button class="btn button">This is a button</button>
JavaScript
$('.button').hide();
function showButton(){
$('.button').show();
};
function refreshAt(hours, minutes, seconds) {
var now = new Date();
var then = new Date();
if(now.getHours() > hours || (now.getHours() == hours && now.getMinutes() > minutes) || now.getHours() == hours && now.getMinutes() == minutes && now.getSeconds() >= seconds) {
then.setDate(now.getDate() + 1);
}
then.setHours(hours);
then.setMinutes(minutes);
then.setSeconds(seconds);
var timeout = (then.getTime() - now.getTime());
setTimeout( showButton, timeout);
};
refreshAt(10, 57, 00);