[b]"What's the best way to implement javascript scroll to element smoothly?"[/b] or [b]"How can I use javascript s

14 Replies, 1501 Views

"What's the best way to implement javascript scroll to element smoothly?"

Hey folks! 👋

I’ve been trying to get a smooth javascript scroll to element effect working on my site, but it’s either too jumpy or just doesn’t work at all. 😅

I’ve seen some solutions using `window.scrollTo()` with behavior: 'smooth', but it’s kinda inconsistent across browsers. Anyone got a reliable way to do this without jQuery?

Also, is there a way to add a slight delay or easing to make it feel more natural?

Thanks in advance! 🙏

---

*PS: If you’ve got code snippets, even better!*

Messages In This Thread
[b]"What's the best way to implement javascript scroll to element smoothly?"[/b] or [b]"How can I use javascript s - by - 29-09-2024, 07:16 PM



Users browsing this thread: 1 Guest(s)