+ 3

Why wont this work?

I have this code here var x="0%"; var m="100%"; var y="5%"; function progp() { var fill=document.getElementById("prog_fill").style.width if(x<m){ x=x+y; } fill=x; } and i want that everytime the function progp() is called the width (i set width to fill) will increse by 5% please help me

14th Aug 2017, 10:32 AM
TrueJu
TrueJu - avatar
7 Respostas
14th Aug 2017, 11:23 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
+ 3
thank you so much
14th Aug 2017, 11:10 AM
TrueJu
TrueJu - avatar
+ 3
ohh its great thank you
14th Aug 2017, 2:17 PM
TrueJu
TrueJu - avatar
+ 2
var x=0, m=100, y=5 function progp(){ var fill = document.getElementById("prog_fill"); x= x<m?x+y:m; fill.style.width = x +"%" }
14th Aug 2017, 10:58 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
+ 2
you can ask me anytime
14th Aug 2017, 11:11 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
14th Aug 2017, 11:12 AM
TrueJu
TrueJu - avatar
+ 2
nice
14th Aug 2017, 11:13 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar