Over scrolling
When I scroll I scroll one section at a time which is working. However, if the user keep scrolling it'll go from section 1 to 7 not section 1 to 2. Is there a way to cancel scrolling for a sec or some way to disable scroll?
10 Replies
Basically like like this website https://kuon.space/#top
When you scroll you don't scroll pass the 1st section until the animation is done or something like that.
You probably want to set a timeout on your scroll function
So that when the user scrolls, it only calls an event once
how would I combine event listen and timeout? do I timeout after the user scroll or set a time out and run it when the user scroll it?
Forgive me if this is wrong; I'm going off memory
But I think this is what I did when I did something similar to you
Hopefully this at least points you in the right direction; not the most experienced here with JS
hmmm don't seems to work...
here's my code on how I think this person did it
everything works, but I need to find out how to make that setTimeout to work. When I added it given me an error saying '{' is expected or required statement.
Here's where I put the setTimeout
Never mind, I have figure it out. I just use the timeline on the if after it reads the use scroll.
Thankyou for the help 🙂
Awesome, I was trying to set up a codepen for you and couldn't get it working 😅
it's all good XD. Never would of thought about timeline without ya. Time to find more errors in the code XD