Closed oneezy closed 2 years ago
Not yet, but that's a good idea. I'll recreate it for you :)
I think this is what your looking for? https://codesandbox.io/s/svelte-scroll-spy-svsxz8?file=/Content.svelte
thanks @maciekgrzybek ! that's exactly what i was looking for. I made one slight adjustment to the section height so it would be more fluid. for some reason your demo wasn't working as expected (see video below)
Code Demo w/ Height Adjustment https://codesandbox.io/s/svelte-scroll-spy-forked-bwujmh?file=/Content.svelte:240-258
Video Demo (yours 0:00-0:11)
... (mine 0:12-0:24)
https://user-images.githubusercontent.com/7369575/175831328-01fca8a0-5ebe-48bc-9d50-75ceb9bb6a96.mp4
I went ahead and put together another demo from your example today. Just leaving this here for anyone else that might need something similar
https://svelte.dev/repl/898c9b36a0f54db39530b54875492cf3?version=3.48.0
Is there a srollspy demo up anywhere? I'm trying to create something like this but having a little bit of trouble with it https://codepen.io/oneezy/pen/ZErggwO