Skip to content

Releases: hilios/jQuery.countdown

v2.2.0

08 Aug 12:23
Compare
Choose a tag to compare

What's new in 2.2.0?

  • Total count for hours %I, minutes %N, seconds %T;
  • Count to weeks left to complete a month %W (issue #210);
  • Defer initialization, allow control the start of the plugin (issue #198);
  • Fix pluralization bug when return is zero ( issue #187).

Deferred initialization

Allows the registration of callbacks before starting the plugin, so always renders at the initialization.

$('#clock').countdown('YYYY/MM/DD', {defer: true})
.on('update.countdown', function(event) {
    $(this).html(event.strftime('%D days till end...'));
})
.countdown('update') //
.countdown('start');

Total count

Standalone usage of any time component in the formatter:

  • %I hours count till end;
  • %N minutes count till end;
  • %T seconds count till end;
$('#clock').countdown('YYYY/MM/DD', function(event) {
    $(this).html(event.strftime('%I hours left'));
    $(this).html(event.strftime('%N minutes left'));
    $(this).html(event.strftime('%T seconds left'));
});

Weeks left %W

To use in conjunction of the months %m displays only the weeks left to complete that month:

$('#clock').countdown('YYYY/MM/DD', function(event) {
    $(this).html(event.strftime('%m months and %W weeks till end...'));
});

v2.1.0

14 Aug 16:14
Compare
Choose a tag to compare

Follow the semver correctly this time, new features available since elapse version.

What's new in 2.1.0?

  • Proper offset for days left to a month and to a week;
  • Fix bower (Issue #136);

daysToMonth %n

The amount of days left from a complete month:

$('#clock').countdown('YYYY/MM/DD', function(event) {
    $(this).html(event.strftime('%m months and %n days till end...'));
});

daysToWeek %d

The amount of days left from a complete weeks. The old days behaviour will be changed to match the totalDays.

$('#clock').countdown('YYYY/MM/DD', function(event) {
    $(this).html(event.strftime('%w weeks and %d days till end...'));
});

v2.0.5

24 Jul 19:29
Compare
Choose a tag to compare

What's new in 2.0.5?

  • Allow precision controls through an options object;
  • Allow to continue after countdown finishes;
  • Don't dispatch events when nothing changes;

Continue

var fiveSecsAgo = new Date().getTime() + 5000;
$('#clock').countdown(fiveSecsAgo, {elapse: true}).on('update.countdown', function(event) {
    $this = $(this);
    if (event.elapsed) {
        $this.html(event.strftime('%S seconds from finish!'));
    } else {
        $this.html(event.strftime('%S seconds till finish...'));
    }
});

Control precision

// Update every second
$('#clock').countdown('YYYY/MM/DD', {precision: 1000});

v2.0.4

03 Jun 18:20
Compare
Choose a tag to compare

What's new in 2.0.4?

  • Fix bower tag
  • Fix jQuery plugin tag

v2.0.3

22 May 13:35
Compare
Choose a tag to compare

What's new in 2.0.3?

  • Fix #27 Remove instance number from data element that had the countdown removed;
  • Fix #34 Add support for MySQL dates YYYY-mm-dd;
  • Fix #38 Countdown couldn't restart after finished;
  • Add functional test automation through Karma;

v2.0.2

12 Dec 22:46
Compare
Choose a tag to compare

Install via Bower

bower install jquery.countdown

Add a script to your html:

<script src="/bower_components/jquery.countdown/dist/jquery.countdown.js"></script>

What's new in 2.0.2

  • #22: Fix pause/continue crash with one countdown instance
  • #25: Add Bower support

v2.0.1

12 Dec 22:39
Compare
Choose a tag to compare

What's new in 2.0.1

  • Use strict mode
  • #18: Add proper RequireJS testing

v2.0.0

12 Dec 22:44
Compare
Choose a tag to compare

Great improvements

The 2.0.0 release is a major step forward in The Final Countdown jQuery plugin, this version introduces a new strftime formatter that allows greater flexibility and easy of use to render the countdown.

Also a newly introduce website and documentation hosted in GitHub Page at http://hilios.github.io/jQuery.countdown/

<div id="getting-started"></div>
<script type="text/javascript">
  $('#getting-started').countdown('2015/01/01', function(event) {
    $(this).html(event.strftime('%w weeks %d days %H:%M:%S'));
  });
</script>

What's new in 2.0.0

  • Add the strftime formatter
  • Add support for jQuery callback style
  • Add grunt tools
  • Better docs and examples

v1.0.2

16 Dec 16:59
Compare
Choose a tag to compare

What's new in 1.0.2

  • #15: Add AMD support
  • #10: Fix bug that call finish 2sec earlier
  • #17: Fix bug parsing the milliseconds value has a string