16067_1494126611 Posted May 15, 2024 Posted May 15, 2024 Hey, 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.
Solution Rodrigo Posted May 15, 2024 Solution Posted May 15, 2024 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: https://gsap.com/resources/get-started/#transform-shorthand Here is a fork of your demo: See the Pen wvbKBQP by GreenSock (@GreenSock) on CodePen. Hopefully this helps. Happy Tweening! 1
16067_1494126611 Posted May 16, 2024 Author Posted May 16, 2024 Yes, this works like a charm! Pretty obvious looking at it now ?, but thanks alot! 2
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now