Animation through buttons | SoloLearn: Learn to code for FREE!

+5

Animation through buttons

What if I want to trigger an animation by pressing a button ? What and how should I use for the code given below :- https://code.sololearn.com/WmjuJkHiBvJ4/?ref=app

6/9/2018 3:51:50 AM

Hemant Jaiswal

6 Answers

New Answer

+7

Calviղ Beat me to it. Yes, perfect example. Cheers

+6

Use Javascript and an html <form>. You can also make the div the button as well, without having a separate button. More JS 😬

+6

https://code.sololearn.com/WEhcVPXb5ZX5/?ref=app

+6

Anthony Quick Calviղ Rahul George Thanks guys, this will definately help me 😊

+5

Hemant Jaiswal Cheers! :)

+4

https://stackoverflow.com/questions/27543964/start-a-css-animation-on-button-click A sample codepen project: https://codepen.io/thetallweeks/pen/boinE