Jump to content
Search Community

GSAP ScrollTrigger MatchMedia onResize

fernandocomet test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

ScrollTrigger.matchMedia() is obsolete now that we've added the much more powerful gsap.matchMedia() to the core which is totally integrated with ScrollTrigger. You can greatly simplify your code too. No need for jQuery either: 

See the Pen BavGKBG?editors=0010 by GreenSock (@GreenSock) on CodePen

 

I didn't notice any difference in your code between the mobile and desktop versions, but I created some variables in there for you to tap into if you need them. 

 

Better? 

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.
×
×
  • Create New...