Page scrolling in vanilla JavaScript | pawelgrzybek.com
Scrolling to an element on a page has always been easy with jQuery. It's a bit tricky in vanilla JavaScript — but definitely doable....
On the very off chance that my office can phase out jQuery before scroll-behavior gains wider support, I’ve been looking around for a Vanilla JS smooth scroll solution. This is a pretty good example + explainer using requestAnimationFrame.
Advertisement
Advertisement