Smooth scrolling with js scroll into view is hit or miss. For a bulletproof fix, I’d recommend using GSAP’s `ScrollTo` plugin.
It’s overkill for simple stuff, but man, it’s smooth as butter. Plus, no polyfill needed.
Here’s a snippet:
```js
gsap.to(window, { duration: 1, scrollTo: '#myElement' });
```
It’s overkill for simple stuff, but man, it’s smooth as butter. Plus, no polyfill needed.
Here’s a snippet:
```js
gsap.to(window, { duration: 1, scrollTo: '#myElement' });
```
