Hello, I'm using a JQuery Countdown Clock plugin from here.
Unfortunately I need to have leading 0 where there are single digits. For example 1:1:22 should display as 01:01:22.
Can anyone help with this?
Thanks
Hello, I'm using a JQuery Countdown Clock plugin from here.
Unfortunately I need to have leading 0 where there are single digits. For example 1:1:22 should display as 01:01:22.
Can anyone help with this?
Thanks
I added an issue to Countdown project to make new "leading zeros" option
I got this working using the 'Layout' mode.
http://keith-wood.name/countdownRef.html
My code now looks like this...
$j('#Countdown').countdown({
until: until,
layout: '<div class="countdown_section">' +
'<div><span class="digits">{dnn}</span><br/>Days</div>' +
'<div><span class="digits">{hnn}</span><br/>Hours</div>' +
'<div><span class="digits">{mnn}</span><br/>Minutes</div>' +
'<div><span class="digits">{snn}</span><br/>Seconds</div></div>',
serverTime: since,
onExpiry: function(){
render_expire();
}
});
Cheers!
I couldn't get that layout mode trick working, so I used this:
http://www.fundp.ac.be/sciences/chimie/javas/js_format.html
and spliced the code into the _showFull method in the countdown js file.