Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Semantic UI progress bar reset

I was trying to use the Semantic UI progress bar as a vote/poll graph. When I tried resetting the data-value to zero, the progress bar would not animate and change back to zero.

$('#choiceA').progress({value:0, total:0});

It seems like setting value to some extremely small number makes the animation work though:

$('#choiceA').progress({value:0.00000001, total:0});

Is this an acceptable fix to the problem? Or is there a better way to do this.

edit: seems like the issue has been brought up here https://github.com/Semantic-Org/Semantic-UI/issues/1395

like image 990
Arthur Chan Avatar asked Dec 12 '14 19:12

Arthur Chan


1 Answers

Set progress percent 0:

$('#choiceA').progress({
  percent: 0
});

or use

$('#choiceA').progress('reset');

Here is working fiddle

like image 66
Govind Samrow Avatar answered Oct 02 '22 15:10

Govind Samrow