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
Set progress percent 0:
$('#choiceA').progress({
percent: 0
});
or use
$('#choiceA').progress('reset');
Here is working fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With