Separator Posted June 14, 2022 Share Posted June 14, 2022 Hi there, I'm building a multistep contact form and each time i click the next button i want the flower to rotate for 45 degrees but now it only rotates once on the first click and not on the other clicks. And also i want it to rotate back when i click the back button. Attached is a simplified codepen and i hope there is enough code to explain the situation. See the Pen PoQVZNG by Separator (@Separator) on CodePen Link to comment Share on other sites More sharing options...
Solution Cassie Posted June 14, 2022 Solution Share Posted June 14, 2022 Hey there! Ah this is nice and simple, what a breath of fresh air in these forums. 💚 You just need a relative value. Happy tweening!rotate: '+=45' 3 Link to comment Share on other sites More sharing options...
Separator Posted June 14, 2022 Author Share Posted June 14, 2022 Thank you Cassie Much appreciated! However, how do i animate back (reverse) when i click the back button? Link to comment Share on other sites More sharing options...
PointC Posted June 14, 2022 Share Posted June 14, 2022 rotate: '-=45' 1 1 Link to comment Share on other sites More sharing options...
Separator Posted June 14, 2022 Author Share Posted June 14, 2022 Lol, sorry for not thinking 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now