+ 1
javascript set interval
hey guys, i made a code with a progress bar so when the setInterval is up, a timeout fades in. Im already done with the code but i dont know whats wrong with it, please help me check my js code, especially the set interval function. If theres anything wrong https://code.sololearn.com/Wk9j38oYKC3l/?ref=app https://code.sololearn.com/Wk9j38oYKC3l/?ref=app
3 odpowiedzi
+ 13
Your interval in the setInterval() is 100ms, progressbar value is 20. This value is reduced by 1 every 100ms. So, the progress bar will be empty is 2 seconds.
To make it slower, you can increase the interval or the progressbar value. Or you can decrease the subtracted value: try 0.1 instead of 1.
I have a similar project in which I've solved this issue. I hope it helps:
https://code.sololearn.com/W81SBc95d9E4/?ref=app
+ 2
That's not it . I intentionally did that to speed it up.. for a test check
+ 2
But I read and scaled through your code.... Even though your comment didn't help... Your code did 100%
Love this bro
I know what to do now
Thanks