Cool Mechanical Scoreboard Style Countdown Plugin For jQuery - Countdown

Cool Mechanical Scoreboard Style Countdown Plugin For jQuery - Countdown
File Size: 479 KB
Views Total: 28009
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Countdown is a cool and simple jQuery plugin for creating a mechanical scoreboard style countdown timer to display the remaining time in seconds, minutes, hours and days to any date.

Features:

  • Custom startTime and endTime.
  • Custom time format.
  • Custom time step.
  • Amazing numbers flipping effect.
  • Supports callback function after the countdown has finished.
  • A timer P

See also:

Basic Usage:

1. Create a container for the countdown timer.

<div class="digits"></div>

2. Include the jQuery javascript library and jQuery countdown plugin in the page.

<script src="/path/to/cdn/jquery.min.js"></script> 
<script src="js/jquery.countdown.js"></script> 

3. Call the plugin on the container element and override the default start/end time as follows:

$(function(){
  $(".demo").countdown({
    startTime: "10:10",
    endTime: '50:00' // or a data object
  });
});

4. Execute a callback function after the countdown ends.

$(function(){
  $(".demo").countdown({
    startTime: "10:10",
    endTime: '50:00',
    timerEnd: function() { alert('end!!'); },
  });
});

5. Available options to customize the countdown.

$(".demo").countdown({

  // 60s
  stepTime: 60,
  
  // custom date format
  format: "dd:hh:mm:ss",

  // start/end time
  startTime: "01:12:32:55",

  // digit options
  image: "digits.png",
  digitImages: 6,
  digitWidth: 67,
  digitHeight: 90,

  // callback
  timerEnd: function(){},
  
  // continuous countdown?
  continuous: false,

  // start the countdown on page load?
  start: true

});

Change logs:

2015-08-11

  • update

2014-06-10

  • Fixed IE8 issue where substr -2 equates to 0 value returning whole string. 
  • Replaced with slice which returns last two values always

2014-01-10

  • intervals array reset and clear actual interval main when recreate the counter

This awesome jQuery plugin is developed by Reflejo. For more Advanced Usages, please check the demo page or visit the official website.