I encode the countdown using the jQuery countdown plugin.
I want it to show active ("non-zero") periods, for example. instead
time remaining: 0 days, 0 hours, 13 minutes, 20 seconds
he should only show
13 minutes, 20 seconds.
My code is:
$('#countdown').countdown({ expiryUrl:'index.php?show=main', expiryText: 'EXPIRED', until: timeleft, layout:'{d<}{dn} {dl} and {d>}{h<}{hn} {hl}, {h>}{m<}{mnn} {ml}, {m>}{s<}{snn}{sl}{s>}' });
But the problem is that with this code it hides the "Days" period, but NOT "Hours / minutes"
I am currently getting the following:
time remaining: 0 hours, 10 minutes, 27 seconds
What do I need to do to hide ALL zero periods?
Thanks!
source share