What's the best way to implement javascript scroll to element smoothly? or How can I use javascript s

14 Replies, 1827 Views

Hey OP! Just wanted to say thanks for all the suggestions—this thread is gold! 🎉

I tried the `scrollIntoView` method, and it’s way better than what I was doing before. Still testing the polyfill for older browsers, but so far so good.

Quick follow-up: Anyone know how to handle offset for fixed headers? My nav bar covers the top of the scrolled-to element. 😅

(Also, big shoutout to whoever mentioned GSAP—definitely checking that out next!)

Messages In This Thread



Users browsing this thread: 1 Guest(s)