Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
mikeage

ScrollTrigger "Scrollytelling"

Recommended Posts

Hello, I'm trying to create a timeline that pins a sidebar when you get to the section on the page and updates the active image as you scroll through the years. It is partly working but seems to skip the first image altogether.

 

I've created a CodePen here:

https://codepen.io/mikemedoro/pen/oNxZGEP

 

It is based on this official demo:

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

 

Thanks for the great plugin. Any help is appreciated!

 

 

 

Share this post


Link to post
Share on other sites

Hey Mike, welcome to the GreenSock forums.

 

That pen was just a concept, it's not guaranteed to be production ready :) In your project you should probably use the boundingClientRect which calculates the offset more absolutely:

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

  • Like 4

Share this post


Link to post
Share on other sites

Thank you Zach! That's what I was looking to achieve.

Share this post


Link to post
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.

×