Jump to content
GreenSock

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

How do I disable the scrollTrigger animation on a certain screen size?

Recommended Posts

Hello. On low screen resolutions I will have a completely different header, so I don't need the scrollTrigger animation. I understand that I have to write conditions in "onRefresh", but I don't understand what exactly I have to write there. If I make disable(), then I can't make enable() because there's nowhere to do it. Here is code:

 

https://jsfiddle.net/3dm1xnp5/

Link to comment
Share on other sites

 

Hello @qqignatqq

 

Sounds to me like it is .matchMedia() that you are looking for.

 

As this thread discussed, there appear to have been problems lately with the .saveStyles() in connection to that, which happen to have been resolved for the next release.  Hope this helps.

 

 

 

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