Kency Posted May 27, 2022 Share Posted May 27, 2022 I use snap seem it not working with this case. It working on demo in topic but when I open full in new tab it slow when snap Thanks See the Pen QWQqLBG by kency1310 (@kency1310) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted May 27, 2022 Solution Share Posted May 27, 2022 That's because you set up your "snap" to be a specific number, 0.33333 which means it'll snap to the nearest 1/3rd progress. However, you're using very different widths for your sections, so they wouldn't be in equal increments like that. This may help: See the Pen xxEQNBB by GreenSock (@GreenSock) on CodePen This helper function may also be useful: https://greensock.com/docs/v3/HelperFunctions#getScrollLookup Does that clear things up? 2 Link to comment Share on other sites More sharing options...
Kency Posted May 27, 2022 Author Share Posted May 27, 2022 29 minutes ago, GreenSock said: That's because you set up your "snap" to be a specific number, 0.33333 which means it'll snap to the nearest 1/3rd progress. However, you're using very different widths for your sections, so they wouldn't be in equal increments like that. This may help: This helper function may also be useful: https://greensock.com/docs/v3/HelperFunctions#getScrollLookup Does that clear things up? Yep, Thank you very much. 1 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