Jump to content
Search Community

ScrollTrigger with different trigger on the first section

Louienator
Moderator Tag

Recommended Posts

Louienator
Posted

I think i got it. but it seems that the scroll trigger on the other section didn't work.  And also, why does my square when expand is like trapezoid?

Here's my fiddle:
https://jsfiddle.net/58jo76rs/48/

mvaneijgen
Posted

Console.log() is your friend! Instead of thinking you've setup everything 100% perfect, log the values you're using and check if they are correct with what you're thinking they are. You've used regularSection as your trigger which will only use the element as the trigger and as soon as it would trigger it would show all the images below it. In your case you use a forEach() look and have defined 'zap' all the current item, so that is what you want to use for the trigger. 

 

https://jsfiddle.net/obf4cam5/

  • Like 1

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