garyw Posted November 25, 2019 Share Posted November 25, 2019 I have code that uses a className tween on repeat: TweenMax.to(buttons, PULSE_INTERVAL, {className:'-=pulse', ease:SteppedEase.ease.config(1), repeat:-1}); This toggles the "pulse" CSS class on and off. I know that the className tween is no longer supported. Is there a way to repeat a delayedCall in order to do this? Link to comment Share on other sites More sharing options...
OSUblake Posted November 25, 2019 Share Posted November 25, 2019 Same concept as v2. gsap.to(buttons, { duration: PULSE_INTERVAL, repeat: -1, onRepeat() { // do stuff } }); 3 Link to comment Share on other sites More sharing options...
OSUblake Posted November 25, 2019 Share Posted November 25, 2019 Don't know how you're adding the class names, but to remove them would be like this. gsap.to(buttons, { duration: PULSE_INTERVAL, repeat: -1, onRepeat() { this.targets().forEach(button => button.classList.remove("pulse")); } }); 2 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