feni000 feni000 - 2 months ago 13
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;


http://jsfiddle.net/Aapn8/8362/

Someone have an idea how to make transition work?

Answer

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

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

http://jsfiddle.net/3j0vxx77/17/