Jump to content
GreenSock

TrulyNewbie

Locomotive to ScrollSmoother

Recommended Posts

Hi, I'm moving from Locomotive to ScrollSmoother.

 

When my testimonial changes size, the area beneath the footer is huge. Or when I resize a text box I have the same problem.

 

So is there a version of "locoScroll.Update", "locoScroll.Start" and "locoScroll.Stop" for gsap?

 

$('.testimonials').on('afterChange', function(){
locoScroll.update();ScrollTrigger.refresh(); 
    console.log("after")
});

 

I've read the docs, but maybe I'm not searching for the right terms

  • Like 1
Link to comment
Share on other sites

  • TrulyNewbie changed the title to Locomotive to ScrollSmoother

Maybe ScrollTrigger.refresh() ?

Link to comment
Share on other sites

1 hour ago, Cassie said:

Maybe ScrollTrigger.refresh() ?

Thank you. That works! 

 

But what about:

 

window.addEventListener('load', (event) => {
 locoScroll.stop()
});

function goAhead() {
locoScroll.start(); 
}
}});

 

How can I replicate this?

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