Jump to content
Search Community

Parallax effect using Scrolltrigger

Tarik khatry test
Moderator Tag

Recommended Posts

Hello my gorgeous teachers on the internet!😃

 

i am beginner with website designing and coding.

so this is a parallax effect that i learned from this youtube tutorial

 

 

MAIN PROBLEM : This tutorial uses ScrollMagic for achieving the effect in the website but i want to use the gsap's ScrollTrigger.

i have created a pen. can you please help me with javascript : )

 

thank you for your time!

See the Pen OJNEEZY by Trixx94 (@Trixx94) on CodePen

Link to comment
Share on other sites

Hi @Tarik khatry,

 

There's a few things with your demo that are throwing ScrollTrigger off. First, when using it in the timeline you want to camelCase scrollTrigger. Also, the way your code (html and css) is setup, it won't want to scrub your animation using bottom bottom, try end: "+=100%"  and finally, your trigger is looking for the class .first-section, not the id.

  • Like 2
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...