hree Posted June 21 Share Posted June 21 The function I want is that when I press add button, characters are created in Splittext motion, and when I press remove button, characters disappear in Splittext motion Can't I use gsap.to () in Splittext? See the Pen eYaMyYa by hree (@hree) on CodePen Link to comment Share on other sites More sharing options...
Solution Cassie Posted June 21 Solution Share Posted June 21 Hi there, yes, you can use 'to' with splittext. In your 'remove' tween you're trying to animate from an opacity/autoAlpha of 1 (visible) but you're not specifying that you want to animate "to" opacity/autoAlpha 0 (invisible) So when you click remove it's trying to animate from visible, to visible. This is probably the best way to solve the problem - using control methods instead of tweens. See the Pen MWdVrRw?editors=0110 by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
hree Posted June 24 Author Share Posted June 24 This is the function I wanted. 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