Need advise for animation using jquery | Sololearn: Learn to code for FREE!
+ 2

Need advise for animation using jquery

Hello guys, I am trying design an animated menu button which expands on click. Below is the sample code. I have pretty much managed to achieve my requirement but if you notice the x button carefully, i have rotated it to 45 deg. But the rotation is not animated. So could anyone please advise, how can i achieve animation with rotation?? Thanks in advance. https://code.sololearn.com/WxNFJRrcM7ZY/?ref=app

30th Dec 2017, 3:58 AM
Shubhank Goel
Shubhank Goel - avatar
6 ответов
+ 5
Try add .main button { l transition: all 1s; }
30th Dec 2017, 4:16 AM
Calviղ
Calviղ - avatar
+ 2
Thanks... This works...
30th Dec 2017, 4:19 AM
Shubhank Goel
Shubhank Goel - avatar
+ 2
Don't forget to add prefixer for all browser types.
30th Dec 2017, 5:02 AM
Calviղ
Calviղ - avatar
+ 2
Yeah... Will do
30th Dec 2017, 5:19 AM
Shubhank Goel
Shubhank Goel - avatar
+ 2
You can just add in CSS
30th Dec 2017, 5:21 AM
Calviղ
Calviղ - avatar
+ 1
One more ques... This be added in js as a css property as well, Right?
30th Dec 2017, 5:20 AM
Shubhank Goel
Shubhank Goel - avatar