Minimal Countdown Timer Library For jQuery - uiTimeBomb

Minimal Countdown Timer Library For jQuery - uiTimeBomb
File Size: 9.96 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

uiTimeBomb is a really simple jQuery plugin that provides a flexible way to create countdown timers with custom output formats on the webpage. Also provides as a pure JavaScript version which you can implement on your current web project without any dependencies.

How to use it:

1. Add the jquery.uitimebomb.min.js script after you've added jQuery library.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="src/jquery.uitimebomb.min.js"></script>

2. Create a placeholder element for the countdown timer.

<div id="timer"></div>

3. The JavaScript (jQuery script) to render a new countdown timer that will counts down from a specific time.

$.uiTimeBomb({
  date:new Date( Date.now()+(12E4) ),
});

4. Default plugin settings to customize the countdown timer.

$.uiTimeBomb({
  elements:[],
  date:new Date(),
  padNumbers:false,
  mode:"years",
  format:"{y} years, {m} months, {d} days, {h} hours, {i} minutes, {s} seconds",
  localTime:true,
  onStart:null,
  onUpdate:null,
  onComplete:null
});

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