Skip to content

countdown timer #4

@ht1080z

Description

@ht1080z

Hi, i cannot success to set the progressbar to work as countdown timer. I'd like to set up a countdown timer that start from the end (100) and the line shrink to 0 in 15sec.

 var $basic = $('#progressTimer');
 var basicBar = $basic.find('.number-pb').NumberProgressBar({
  duration: 15000,
  style: 'basic',
  min: 1,
  max: 100,
  current: 100
});

var basicLoop = function() {
  basicBar.reach(undefined, {
    duration: 15000
  });
}

basicLoop();

and if its an easiest way to trigger the function, not in 3 separated function like above.
Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions