Share Posted September 14, 2021 when I click on the menu, it seems working well.. but after that top portion hide or top scrolling doesnt work.. when i remove locomotive scroll it works good...pls help me See the Pen ExXvqNZ by pradeepppi (@pradeepppi) on CodePen Link to comment Share on other sites More sharing options...
Share Posted September 14, 2021 Hey there, @Pradeep PI Locomotive-scroll does not make use of native scroll behaviour and changes things fundamentaly when it comes to that. Thus it won't work with GSAP's ScrollTo-Plugin but instead has a scrollTo method of its own, which you can find more info on in their docs. https://github.com/locomotivemtl/locomotive-scroll As it is not a GSAP product, support for locomotive-scroll is not actually offered in these forums. There is a GSAPy smoothScroll() function with ScrollTrigger too though, if that's something you might want to consider instead of locomotive-scroll. You can find an example of that in the .scrollerProxy() documentation. Happy scrolling 2 Link to comment Share on other sites More sharing options...
Author Share Posted September 14, 2021 1 hour ago, akapowl said: Hey there, @Pradeep PI Locomotive scroll does not make use of native scroll behaviour and changes things fundamentaly when it comes to that. Thus it won't work with GSAP's ScrollTo-Plugin but instead has scrollTo-method of its own, which you can find more info on in their docs. https://github.com/locomotivemtl/locomotive-scroll As it is not a GSAP product, support for locomotive-scroll is not actually offered in these forums. There is a GSAPy ScrollTrigger smoothScroll() function too, though, if that's something you might want to consider instead. You can find an example of that in the .scrollerProxy() documentation. Happy scrolling Link to comment Share on other sites More sharing options...
Share Posted September 14, 2021 Quote can u pls check the below script has any error or issue Yes, as I mentioned, GSAP's ScrollTo-Plugin simply does not work with locomotive-scroll, so you can not use it when you use locomotive-scroll. Also you are trying to make use of jQuery syntax but are not loading jQuery in the first place. Here is a solution without jQuery using locomotive-scroll's own scrollTo method See the Pen 7fad2da08a4628a44511bfb7c79da891 by akapowl (@akapowl) on CodePen 3 Link to comment Share on other sites More sharing options...
Author Share Posted September 14, 2021 59 minutes ago, akapowl said: Yes, as I mentioned, GSAP's ScrollTo-Plugin simply does not work with locomotive-scroll, so you can not use it when you use locomotive-scroll. Also you are trying to make use of jQuery syntax but are not loading jQuery in the first place. Here is a solution without jQuery using locomotive-scroll's own scrollTo method hi @akapowl bro thank you so much.. It works well 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