Open RFlintstone opened 5 years ago
Is it possible to redirect a visitor to another page with smoothscroll (even if this is a external one such as https://github.com) when I scroll?
I currently detect if a user is scrolling with
window.addEventListener("wheel", myFunction); function myFunction() { alert("You are scrolling"); }
Thanks in advance, Ruben
Try this snippet of code:
window.addEventListener("wheel", myFunction); function myFunction() { window.location.href = "http://github.com"; }
Is it possible to redirect a visitor to another page with smoothscroll (even if this is a external one such as https://github.com) when I scroll?
I currently detect if a user is scrolling with
Thanks in advance, Ruben