Semantic user interface progress bar reset

I tried to use the Semantic UI progress bar as a voting / polling graph. When I tried to reset the data value to zero, the progress bar will not animate and return to zero again.

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

It seems that the setting value for some extremely small number makes the animation work:

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

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

edit: it seems the problem has been raised here https://github.com/Semantic-Org/Semantic-UI/issues/1395

+5
source share
3 answers

You may try

 $('.ui.progress').progress('reset'); 

taken from here to reset the progress bar.

0
source

try setting the percentage to 0

 $('.ui.progress.black').progress({percent: 0}); 
0
source

Set progress percentage 0:

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

or use

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

Fiddle works here

0
source

Source: https://habr.com/ru/post/1208914/


All Articles