+ 13

how to restart the motion of a moving object after stopping it in java sript??

I have made a box move by clicking on the button then I stopped it by another now how start the motion again from the point where it stopped?🤔🤔

18th Feb 2017, 2:21 PM
Nikhil
Nikhil - avatar
4 Respostas
+ 12
thank u and how is my code -- box moving Remember I am a beginner
18th Feb 2017, 3:57 PM
Nikhil
Nikhil - avatar
+ 11
Can u tell how I can use that stop button to stop the motion again
18th Feb 2017, 4:23 PM
Nikhil
Nikhil - avatar
+ 3
set the offset of the box back to its beginning for example: document.getElementById ("myBox").style.left='20px'; this would set the offset of the box from the left to 20px
18th Feb 2017, 3:30 PM
Daniel S
Daniel S - avatar
+ 3
It's good for a beginner
18th Feb 2017, 4:22 PM
Daniel S
Daniel S - avatar