lich0320 Posted February 21, 2022 Share Posted February 21, 2022 Question: How can i use span:labelsDirectional in scrollTrigger with mutiple timeline ? Is there any way to achieve him ? Demos: In this demo, I created four timeLabels, one timeLine has two timeLabels. In first timeline he works fine, but when he can't switch to the next timeline. Thanks help!!! See the Pen xxPjKvP by liar0320 (@liar0320) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted February 21, 2022 Share Posted February 21, 2022 I don’t see any problems in that CodePen demo behavior. What am I missing? Link to comment Share on other sites More sharing options...
lich0320 Posted February 22, 2022 Author Share Posted February 22, 2022 10 hours ago, GreenSock said: I don’t see any problems in that CodePen demo behavior. What am I missing? I updated my case In the case, I have [scrolltrigger < section01 >] and [scrolltrigger < section02 >]。 It works well when triggered by [scrolltrigger < section01 >] alone. It also works well when triggered by [scrolltrigger < section02 >] alone. <Works refers to snap to label> However, during the scroll from [scrolltrigger < section01 >] to [scrolltrigger < section02 >] , he cannot snap to the label in [scrolltrigger < section02 >] Excuse me , How can I achieve this effect ? Link to comment Share on other sites More sharing options...
GreenSock Posted February 22, 2022 Share Posted February 22, 2022 That's because there's no ScrollTrigger active in that area that would do any snapping. You could simply do this: ScrollTrigger.create({ trigger: ".bg-yellow-800", snap: [0, 1] }); See the Pen gOXzXNa?editors=0010 by GreenSock (@GreenSock) on CodePen Is that what you mean? 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