jQuery.countdown icon indicating copy to clipboard operation
jQuery.countdown copied to clipboard

how to count up instead of count down?

Open krystyna93 opened this issue 7 years ago • 4 comments

Hi,

Is there a simple way of modifying the code to count up instead of count down?

krystyna93 avatar Sep 29 '17 08:09 krystyna93

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.

bafsar avatar Sep 30 '17 20:09 bafsar

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 .

krystyna93 avatar Oct 01 '17 01:10 krystyna93

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 .

krystyna93 avatar Oct 01 '17 01:10 krystyna93

https://gist.github.com/onskyD/cc7547b8c536f58ea3e1d61ce6dadc2c#file-scripts-js

onskyD avatar Feb 16 '18 18:02 onskyD