Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

ScrollTrigger - Disallow scroll until function runs?

Recommended Posts

I need to be able to play through a GSAP timeline, and when it is completed, run a different timeline on ScrollTrigger.


I did this using GSAP and ScrollMagic, and am now converting the site I built to use ScrollTrigger, but this specific requirement I am not sure which feature of ScrollTrigger I might use to make this happen. Tried disable and enable but it didn't seem to work.


Here's the working example of the site I already built and am trying to translate over to ScrollTrigger from ScrollMagic: http://mischiefusa.com/



Link to post
Share on other sites

I'd wait to create the ScrollTrigger until your first timeline completes. Pop that ScrollTrigger into a function and call it with an onComplete callback on the first timeline.




  • Like 2
Link to post
Share on other sites

Thanks @PointC, that worked! It's what I thought I'd have to do, though I admit I was hoping for there to be some more elegant built in solution. It works well though so no big! Cheers!

Link to post
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.