ferriss Posted October 26, 2021 Share Posted October 26, 2021 Hi, I'm trying to animate a fade of an element that is hidden. gsap.to( this.$nav, 1, { opacity: 1, display: 'block', onComplete: () => { console.log('Open') } }); The onComplete is fired when display block is complete, not the whole animation. If I remove the display block, the onComplete works as expected (after 1 second). Should the onComplete work with all properties? Thanks, Tom Link to comment Share on other sites More sharing options...
Solution Cassie Posted October 26, 2021 Solution Share Posted October 26, 2021 Hi Tom! You're right it should run after the entire tween has completed. I can't recreate this however - could you possibly fork this codepen to demonstrate the issue? Maybe you're using a different version of GSAP? See the Pen MWvmYYP by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
ferriss Posted October 26, 2021 Author Share Posted October 26, 2021 Strange, it's working now, really odd. Will re-open if I replicate again. 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