1

i am trying to use the jQuery plugin countdown 2.1 to count the time up. I need to clock to start at 0 and count up one second at a time.

Here is what I have done

        $('#MasterBreakTimer').countdown(new Date(), 
        {
                elapsed: true,
                strftime: '%H:%M:%S'
        });

but it is not displaying anything

How can I correctly implement a count up clock?

Junior
  • 11,602
  • 27
  • 106
  • 212

1 Answers1

0

I figured it out.

I need to add an event to display the results like so

$('#MasterBreakTimer').countdown(new Date(), 
{
        elapse: true,
        strftime: '%H:%M:%S'
}).on('update.countdown', function(event){
    $(this).html(event.strftime('<span>%H:%M:%S</span>') );
});    
Junior
  • 11,602
  • 27
  • 106
  • 212
  • Hi, does the countup work with your answer given? I am using http://hilios.github.io/jQuery.countdown/ as the script, but would like to count ascending not descending. Thank you. – Krys Jun 28 '17 at 10:16