«TimeTo» jQuery plugin demo
Countdown timer
Set delay in seconds
$('#countdown').timeTo(120, function(){ alert('Countdown finished'); });
Hide hours
$('#countdown').timeTo({
seconds: 100,
displayHours: false
});
Set delay to specified datetime
$('#countdown').timeTo(new Date(''));
Set captions and dark theme
$('#countdown').timeTo({
timeTo: new Date(new Date('')),
displayDays: 2,
theme: "black",
displayCaptions: true,
fontSize: 48,
captionSize: 14
});
Digital clock
$('#clock-1').timeTo();
Digital clock with Step Setting and Step Callback
$('#clock-w-step-cb').timeTo(
{
step: function() {
console.log('Executing every 3 ticks');
},
stepCount: 3
}
);