feni000 feni000 - 1 year ago 109
CSS Question

CSS transition on data-percentage attribute change

I have found a code that makes a Circular progress bar, and changed it a bit to grow on click from 1 to other number. Later on I wanted to add transition but it doesn't seem to work, the progress bar changes without transition

-moz-transition: all 1s ease-in-out;
-webkit-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;


Someone have an idea how to make transition work?

Answer Source

As @user1850903 wrote - transition doesn't work in that way.

You can use setInterval() to get the effect you want:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download