«TimeTo» jQuery plugin demo

Countdown timer

Set countdown in seconds with callback

$('#countdown').timeTo(120, function() { alert('Countdown finished'); }); 
  • 0
  • 0
  • 0
  • 0
:
  • 0
  • 0
  • 2
  • 2
:
  • 0
  • 0
  • 0
  • 0

Hide hours

$('#countdown').timeTo({
    seconds: 100,
    displayHours: false
}); 
  • 0
  • 0
  • 1
  • 1
:
  • 4
  • 4
  • 0
  • 0

Set countdown to specified date-time

$('#countdown').timeTo(new Date('2025-04-14T00:00:00.069Z')); 
  • 1
  • 1
  • 2
  • 2
  • 1
  • 1
:
  • 5
  • 5
  • 6
  • 6
:
  • 0
  • 0
  • 5
  • 5

Set captions and dark theme

$('#countdown').timeTo({
    time: '23:59:54',
    displayDays: 2,
    theme: "black",
    displayCaptions: true,
    fontSize: 48,
    captionSize: 14,
    lang: 'es'
}); 
  • 0
  • 0
  • 0
  • 0
días
  • 2
  • 2
  • 3
  • 3
horas
:
  • 5
  • 5
  • 9
  • 9
minutos
:
  • 5
  • 5
  • 4
  • 4
segundos


Digital clock

$('#clock-1').timeTo();
  • 0
  • 0
  • 2
  • 2
:
  • 0
  • 0
  • 3
  • 3
:
  • 5
  • 5
  • 5
  • 5

 

Digital clock with Step Setting and Step Callback

    $('#clock-w-step-cb').timeTo(
        {
            step: function() {
                console.log('Executing every 3 ticks');
            },
            stepCount: 3
        }
    );
    
  • 0
  • 0
  • 2
  • 2
:
  • 0
  • 0
  • 3
  • 3
:
  • 5
  • 5
  • 5
  • 5