Jump to content

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

Disable and enable ScrollTrigger

Recommended Posts

Hello everyone !


I've got a little probleme about disable() en enable() ScrollTrigers. I need it to be able to animate through the page with and anchor menu.

Here you can see on my demo, when i use the anchor menu to navigate, there is a little jump and sometimes it goes up to the previous panel.

It happen when i enable the scrollTriggers, i set a timeout to realize that it is at the moment of activation that the problem arises.

In passing, if you have a script to detect all ScrollTriggers for disable and eanble them more easily than i did here, it would be very welcome. :)


Thanks for your help.

See the Pen yLXXQJr by civix (@civix) on CodePen

Link to comment
Share on other sites

Hello there, @ChavazDesign


I don't think you actually have to disable and enable them for what you want to do.


You should be able to set up a check on a boolean for whether or not a button was clicked and only make the ScrollTrigger's callback fire if it is false, like shown in this other thread here. Take a look, give it a try and see if that works better for you :) 



I was a bit quick there; the example in that thread actually does contain code to disable/enable the ScrollTriggers, but I found it to be working for me even without that - your results may vary.



  • Like 3
  • Thanks 1
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.