How in the Flipclock.js plugin to set the countdown timer?
The documentation did not find this item, maybe someone has a ready-made solution?
$ (document) .ready (function () {
var Clock = New Flipclock ($. Clock '), {});
});
Answer 1, Authority 100%
I launched so much, I hope it will help)
jQuery (Document) .ready (Function ($) {
var clock;
var futurdate = new date ("May 29, 2016 0:00 PM EDT");
var currentdate = new date ();
var diff = futurdate.gettime () / 1000 - currentdate.gettime () / 1000;
FUNCTION DAYDIFF (FIRST, SECOND) {
Return (Second - First) / (1000 * 60 * 60 * 24);
}
If (DayDiff (CurrentDate, Futuredate) & LT; 100) {
$ ('. Clock'). AddClass ('TwodayDigits');
} else {
$ ('. Clock'). AddClass ('threedaydigits');
}
if (Diff & LT; 0) {
diff = 0;
}
Clock = $ ('. Clock'). Flipclock (Diff, {
ClockFace: 'Dailycounter',
Language: 'RU',
Countdown: True.
});
});
Answer 2
Here is an example
// Instantiate A Coutdown Flipclock
Clock = $ ('. Clock'). Flipclock (Diff, {
ClockFace: 'Dailycounter',
ClockFaceOptions: {
Countdown: True.
}
});
Clock.Setcountdown (True);
Clock.face.ON ('Stop', Function () {
// Add 24 Hours Worth Of Seconds to the Clock Face
Clock.setFaceValue (24 * 60 * 60);
clock.start ();
});
http://jsfiddle.net/v66j6r5j/ It is certainly strongly customized, but I think you can easily find that You need.