Jump to content
Search Community

Move an Element and change the content based on Scroll

SumitKKundu test
Moderator Tag

Recommended Posts

Hi All,

I want the same effect like this:

http://www.arkleboyce.co.uk/

 

I am a beginner with GSAP as well as JS.  I have tried this here https://codepen.io/SumitKKundu/pen/xxZJrOE  , I could change the content based on current element on viewport on scroll but that is not working properly.

 

Please help me to archive this effect using GSAP and ScrollTrigger.

 

Thanks,

Sumit

See the Pen xxZJrOE by SumitKKundu (@SumitKKundu) on CodePen

Link to comment
Share on other sites

Hey Sumit and welcome to the GreenSock forums.

 

It doesn't make too much sense to toggle classes in this case. Just animate the properties that you need to animate.

 

I highly recommend that you take a look at these examples and try putting them together to create the exact effect that you need:

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

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

 

Unfortunately we don't have the capacity to build out the whole thing for you but please feel free to ask specific questions if you have them.

Happy tweening!

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