Jump to content
Search Community

ScrollTrigger Simple Parallax with Functions

bartmc test
Moderator Tag

Go to solution Solved by elegantseagulls,

Recommended Posts

Hello All,

 

I've forked the ScrollTrigger Simple Parallax Sections demo (

See the Pen QWjjYEw by GreenSock (@GreenSock) on CodePen

) to modify it to create a slightly different reveal. My fork works just the way I'd like it to, but when I resize the browser my vertical spacing goes awry.

 

I tried adding invalidateOnRefresh: true to the triggers, but that didn't work. So I think I need a function to make the sizes re-calculate when the window resizes, but I can't figure out where/how to do it.

 

I also apparently need to find a good tutorial on using functions with ScrollTrigger triggers ; )

 

Any help much appreciated!

See the Pen oNodmeZ by bartmc (@bartmc) on CodePen

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