Jump to content
Search Community

onComplete not working with non tweened properties

ferriss test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...