Jump to content
Search Community

getScrollPosition in a timeline

Leptitnouveau test
Moderator Tag

Recommended Posts


First I would like to apologize if I made some grammatical mistakes or else (I am still learning English)

I did not really understand how does the function getScrollPosition (https://greensock.com/docs/v3/HelperFunctions#getScrollPosition) work. I would have liked to know the Position of an animation that way I can use it as an anchor for my links at the beginning of the page.


For example when we click on the first link "Prologue", it leads us to the moment when we see "Prologue" in the left part of the book (In my JavaScript, it is the equivalent of the moment when "tl.from(".prologue", {yPercent:100, opacity: 0});" ends). 


Is it possible? 

Thank you in advance and have a great day!

See the Pen XWxwmmN by Leptitnouveau (@Leptitnouveau) on CodePen

Link to comment
Share on other sites

  • Leptitnouveau changed the title to getScrollPosition in a timeline

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