How can i move slider value from 1 to 100 in a smooth transition like if it is an animation... | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
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