-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Locomotive Scroll v5 + Nuxt 3 Config? #560
Comments
Hi, I replied a few day's ago on an other related issue, this is how I use Locomotive scroll in Nuxt 3 => #502 (comment) Not sure if this is the 'correct' way to implement, ... |
I tried this the other day and it didn't work for me, however I've just had another go and it worked like a treat. No idea why it was playing up before. Thank you! |
@pieterjanmaes How do I actually implement something like Scroll to top?
I've added Locomotive Scroll to
Where am I going wrong with this? |
@kieranmansfield, i would do it like this: https://scroll.locomotive.ca/docs/#/attributes?id=data-scroll-to-href Add an id to the top of your page:
Or you could create a hook in the plugin:
And then do something like this:
I didn't test the code, just some suggestions :-) |
Hey,
What's the best way of implementing Locomotive scroll in Nuxt 3?
The general consensus is to add it as a plugin. I've tried to get it working it want to play nice with Locomotive Scroll.
Does anyone have an examples of how to get this working?
~/plugins/locomotiveScroll.client.js
The text was updated successfully, but these errors were encountered: