jQuery.countdown - countdown to event


jQuery.countdown - countdown to event

Often, during website creation or its further maintenance, our clients ask to install a countdown timer on their projects. Our team has been looking for a simple and at the same time functional jQuery plugin for a very long time, which would easily solve this problem.

We present to your attention the simplest and most functional countdown timer - jQuery.countdown . Installing the plugin is very easy, all you have to do is develop the design using CSS. & Nbsp;

Include the jQuery.countdown plugin library after the jQuery framework:

<script src="file_path/jquery.countdown.js"></script>

Paste this HTML code where you want to display the countdown timer:

<div id="getting-started"></div>

And the most important thing is plugin initialization. Add this JavaScript code before the closing body tag, but after the previously included jquery.countdown.js plugin library:

$("#getting-started").countdown("2017/01/01", function(event) { $(this).text( event.strftime('%D days %H:%M:%S') );});
  • where 2017/01/01 is the date to which the timer will count down
  •  %D days %H:%M:%S - output format. In this example, the timer will work as: (number of days) days :( minutes) :( seconds).

Examples of plugin operation are available at the link .