Pro tip: Check if your browser even supports smooth scrolling first!
```js
if ('scrollBehavior' in document.documentElement.style) {
element.scrollIntoView({ behavior: 'smooth' });
} else {
// Fallback to jQuery or something
}
```
Also, Safari can be weird with javascript scroll into view. Sometimes adding a tiny timeout fixes it:
```js
setTimeout(() => element.scrollIntoView({ behavior: 'smooth' }), 50);
```
```js
if ('scrollBehavior' in document.documentElement.style) {
element.scrollIntoView({ behavior: 'smooth' });
} else {
// Fallback to jQuery or something
}
```
Also, Safari can be weird with javascript scroll into view. Sometimes adding a tiny timeout fixes it:
```js
setTimeout(() => element.scrollIntoView({ behavior: 'smooth' }), 50);
```
