I use IE8 + Radial Progress Bar , I can not fix it so that when value="0"

* it was impossible to place a working example here, so I gave a link to the codepen

I deduced exactly 0, not 100. I understand that with "null" I need to do a check when rendering, but I can not understand where.

    1 answer 1

    The problem is in the function myDelay , you do not have window.clearInterval(tmr) under the condition m==val , since m you have at least 5 and the test with the value val=0 does not work, it turns to 100.

    The problem will not only be at 0, since you have a step of +5, the interval clearing will occur only when your iterator coincides with the value (which in this case must be a multiple of 5).

    To output 0, you just need m += 5; write after the if construct.

    • It didn’t quite work, but simply post 'var m = -5;', it’s not working properly, but it works. - Jarvis
    • @Jarvis why didn't it work, transfer m + = 5 for if - Vlad Vlad