Licitator 1.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

43 lines
807 B

// Interactiveness now
(function() {
var clock = document.querySelector('digiclock');
// But there is a little problem
// we need to pad 0-9 with an extra
// 0 on the left for hours, seconds, minutes
var pad = function(x) {
return x < 10 ? '0'+x : x;
};
var ticktock = function() {
var d = new Date();
var h = pad( d.getHours() );
var m = pad( d.getMinutes() );
var s = pad( d.getSeconds() );
var current_time = [h,m,s].join(':');
if (clock) {
clock.innerHTML = current_time;
}
};
ticktock();
// Calling ticktock() every 1 second
setInterval(ticktock, 1000);
}());
/* ---------- Notifications ---------- */
$('.noty').click(function(e){
e.preventDefault();
var options = $.parseJSON($(this).attr('data-noty-options'));
noty(options);
});