james182 Posted February 9, 2020 Share Posted February 9, 2020 Hi I have three card elements with hover animations and they are not working as expected, they have glitches. When hovering over a card element the animations works but when you mouse out or mouse over again it freaks out and all three elements play. Could i please get some assistance. See the Pen rNagqZb by james182 (@james182) on CodePen 1 Link to comment Share on other sites More sharing options...
GreenSock Posted February 10, 2020 Share Posted February 10, 2020 You're creating one timeline and shoving all the animations in there whenever there's a hover, so that timeline would just keep getting longer and longer and longer over time (with each hover). It'd be much cleaner to just create a timeline for each hover animation and then play()/reverse() it. Here's a better way: See the Pen 5bacc163e2ebc80c49110ede1b1f2987?editors=0010 by GreenSock (@GreenSock) on CodePen Does that help? 2 Link to comment Share on other sites More sharing options...
james182 Posted February 10, 2020 Author Share Posted February 10, 2020 Yes, that makes sense. Thank you. 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