Share Posted July 14, 2020 Hi! I have a question about a strange problem that I encounter with markers in scrollTrigger plugin. When I use "markers: true" everything works just fine. When I remove them, nothing works. No errors in the console appear. Sorry for not providing demo, I will try to add one if you can't help me without it. Link to comment Share on other sites More sharing options...
Share Posted July 14, 2020 Hey tyte and welcome to the GreenSock forums. That is indeed a very weird problem. Unfortunately we can't help without more information. A minimal demo would be greatly appreciated Link to comment Share on other sites More sharing options...
Author Share Posted July 14, 2020 Thank you for your prompt answer! I think I solved the problem, it was more a matter of css than GSAP :). 1 Link to comment Share on other sites More sharing options...
Share Posted March 16 I have the same issue here See the Pen JjaZdqg by NinjaKinshasa (@NinjaKinshasa) on CodePen It only works when "markers: true" is uncommented. Do you know what can cause this ? Link to comment Share on other sites More sharing options...
Share Posted March 16 Hi @matruck, Actually your example works as intended with or without markers, there is just no scrolling available in the body element, so nothing happens. Here is a fork of your codepen with a few tweaks: See the Pen dyqKMzE by GreenSock (@GreenSock) on CodePen Hopefully this helps. Happy Tweening! Link to comment Share on other sites More sharing options...
Share Posted March 16 Thank you Rodrigo for your reply ! There are still some issues : in your example the scroll stops at card 7 while there are 8 blocs (in the codepen preview), and there is a "dead scroll zone" at the end where nothing happens. I want the scroll to fit perfectly with the #carousel regardless of the size of the viewport 😅 It fits with markers = true so I guess it is doable without having to change the css at all. Link to comment Share on other sites More sharing options...
Share Posted March 16 Hi, Actually there are all visible both in the embedded example and the live one: The reason for having some extra or dead scroll is because you have an end point for the ScrollTrigger instance of +=2000 pixels, so the viewport need at least 2000 pixels of scrolling plus the height of the viewport, which is variable. On top of that you have a fixed element. Honestly is better to use ScrollTrigger's pin option and not trouble yourself with all that: See the Pen dyqKMzE by GreenSock (@GreenSock) on CodePen Hopefully this helps. Happy Tweening! 2 Link to comment Share on other sites More sharing options...
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