Jump to content
Search Community

Struggling with ScrollTo plugin and sticky elements

16067_1494126611 test
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts



Im working on a fullscreen slideshow that goes to the next section when i scroll. I created the slideshow first without the slides being position: sticky and this worked perfectly:

See the Pen wvbaRJe by remcovb (@remcovb) on CodePen


But when added postion: sticky to the sections,  the slideshow only works when going down and breaks when going back up:


Anyone with a solution for this?


See the Pen KKLpbgQ by remcovb (@remcovb) on CodePen

Link to comment
Share on other sites

  • Solution

Hi @16067_1494126611 and welcome to the GSAP Forums!


I think there is no need to use position sticky and scrolling for achieving this. Is far simpler to just use position absolute and yPercent:



Here is a fork of your demo:

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


Hopefully this helps.

Happy Tweening!

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