FlipClock icon indicating copy to clipboard operation
FlipClock copied to clipboard

Add support for weekly countdown

Open techieshark opened this issue 10 years ago • 1 comments

Fixes #198

The following code should show this off, assuming an html element with class="clock" attribute set.


  $(document).ready(function () {
    // Grab the current date
    var currentDate = new Date();
    var eventStart = new Date("Nov 30, 2015");

    // Calculate the difference in seconds between the future and current date
    var diff = eventStart.getTime() / 1000 - currentDate.getTime() / 1000;

    // Instantiate a coutdown FlipClock
    clock = $('.clock').FlipClock(diff, {
      clockFace: 'WeeklyCounter',
      // clockFace: 'DailyCounter',
      countdown: true,
    });
  });

techieshark avatar Jul 09 '15 05:07 techieshark

Here's what this looks like for me:

image

techieshark avatar Jul 09 '15 05:07 techieshark