+ 1

How can i move slider value from 1 to 100 in a smooth transition like if it is an animation...

gradually move slider from 1 to 100 in a given time source code:https://code.sololearn.com/W5tm6egZjAiZ/?ref=app

4th Jul 2021, 9:24 AM
🤖Web Gig🤖
🤖Web Gig🤖 - avatar
6 Réponses
4th Jul 2021, 9:38 AM
Artem 🇺🇦
Artem 🇺🇦 - avatar
+ 3
🤖Web Gig🤖 sorry i deleted the code since you already got the answer ! Anyway i will post it again, let move=setInterval(()=>{ slider.value=parseFloat(slider.value)+parseFloat(slider.step); if(slider.value==100){ clearInterval(move); } },1);
4th Jul 2021, 9:52 AM
Abhay
Abhay - avatar
+ 2
Artem ya bro thanks..
4th Jul 2021, 9:40 AM
🤖Web Gig🤖
🤖Web Gig🤖 - avatar
+ 2
Abhay thanks man...
4th Jul 2021, 9:49 AM
🤖Web Gig🤖
🤖Web Gig🤖 - avatar
0
Abhay bro ,how can i restart the animation with the restart button i added...
4th Jul 2021, 11:01 AM
🤖Web Gig🤖
🤖Web Gig🤖 - avatar
0
🤖Web Gig🤖 few changes and handle restart button (only when animation done) https://code.sololearn.com/W23WECrOgvKv/?ref=app
4th Jul 2021, 2:59 PM
visph
visph - avatar