Jump to content
GreenSock

iDVB

ScrollTrigger fromTo jumping

Recommended Posts

Is there an obvious reason why this scrollTrigger animation JUMPS down into its initial location?

I thought it might be the immediateRender.... but I've even tried setting it to true but it only fixes the scrolling into the start trigger.... when you scroll OUT of the start trigger it still jumps.

 

Essentially, we placed an item in the ideal location with css. Then we want to setup a scrollTrigger animation that moves that item from just above its initial Y to just below its initial Y. 

 

 

    gsap
      .timeline({
        scrollTrigger: {
          trigger: container,
          scrub: true,
          start: 'top bottom',
          end: 'bottom top',
          markers: true,
        },
      })
      .fromTo(
        circle,
        {
          y: '+=100px',
        },
        { y: '-100px', ease: 'none' },
        0
      )
      .fromTo(
        bubble,
        {
          y: '-=150px',
        },
        { y: '+150px', ease: 'none' },
        0
      );

 

Link to comment
Share on other sites

Hey iDVB. It's hard to say based on only the given information. Can you please create a minimal demo using CodePen?

 

 

Also note that you can leave out the "px" in your y values if you want to.

Link to comment
Share on other sites

Thanks @ZachSaucier,

Ya working on an example now... but unable to replicate the issue so far. :(

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.
×