jQuery.countdown
jQuery.countdown copied to clipboard
how to count up instead of count down?
Hi,
Is there a simple way of modifying the code to count up instead of count down?
I don't think so. Because its name is count down; not count up :)
If you want to use some other libraries to do that, I suggest you to use FlipClock. It can count up and count down both.
Hi Bilal,
Actually, Hilios did explain it in another reply, as it was possible to countUp:
"..Just set a config object {elapse: true} as the plugin functions second argument."
$('#clock').countdown('YYYY/MM/DD', {elapse: true}).on('update.countdown', function(event) { var $this = $(this); if (event.elapsed) { $this.html(event.strftime('After end: %H:%M:%S')); } else { $this.html(event.strftime('To end: %H:%M:%S')); } });
On Sun, Oct 1, 2017 at 7:42 AM, Bilal AFŞAR [email protected] wrote:
I don't think so. Because its name is count down; not count up :)
If you want to use some other libraries to do that, I suggest you to use FlipClock http://flipclockjs.com/. It can count up and count down both.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hilios/jQuery.countdown/issues/279#issuecomment-333334707, or mute the thread https://github.com/notifications/unsubscribe-auth/AV30urw3hxogajhMUdCI4C41kO8dNmyEks5snqergaJpZM4PoV5g .
https://github.com/hilios/jQuery.countdown/issues/134
On Sun, Oct 1, 2017 at 12:25 PM, Krystyna [email protected] wrote:
Hi Bilal,
Actually, Hilios did explain it in another reply, as it was possible to countUp:
"..Just set a config object {elapse: true} as the plugin functions second argument."
$('#clock').countdown('YYYY/MM/DD', {elapse: true}).on('update.countdown', function(event) { var $this = $(this); if (event.elapsed) { $this.html(event.strftime('After end: %H:%M:%S')); } else { $this.html(event.strftime('To end: %H:%M:%S')); } });
On Sun, Oct 1, 2017 at 7:42 AM, Bilal AFŞAR [email protected] wrote:
I don't think so. Because its name is count down; not count up :)
If you want to use some other libraries to do that, I suggest you to use FlipClock http://flipclockjs.com/. It can count up and count down both.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hilios/jQuery.countdown/issues/279#issuecomment-333334707, or mute the thread https://github.com/notifications/unsubscribe-auth/AV30urw3hxogajhMUdCI4C41kO8dNmyEks5snqergaJpZM4PoV5g .
https://gist.github.com/onskyD/cc7547b8c536f58ea3e1d61ce6dadc2c#file-scripts-js