james182 Posted April 6, 2020 Share Posted April 6, 2020 Hi GSAP Gurus, I am having an issue where I am trying to replace classes and it's not working. $(element).addClass("red").removeClass("grey"); //Works //Not working gsap.to(element, { duration: 2, className: "+=red", stagger: 0.5 }); I have provided a CodePen Demo also. See the Pen oNXrJEN by james182 (@james182) on CodePen Link to comment Share on other sites More sharing options...
mikel Posted April 6, 2020 Share Posted April 6, 2020 Hey @james182 "We recommend animating the properties that you need animated because tweening between classes isn't very performant, are not explicit, and adding support for them takes a significant amount of kbs for how few people use them. For more information, check out this post: Happy tweening ... Mikel 3 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