Jump to content
Search Community

Mohamed Refaay

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Mohamed Refaay

  1. I made this workaround,

    const subTween = gsap.to(".text", {
      opacity: 1,
      paused: true,
    });
    
    const mainTimeline = gsap
      .timeline()
      .to(".class", {
        opacity: 0,
      })
      .to(".something", {
        yPercent: 200,
    
        onComplete: () => {
          subTween.play();
        },
      });

    onComplete function will only be fired when the timeline on play not on reverse. You can control the time of the sub tween using the delay property. 

    • Like 1
×
×
  • Create New...