scroll-smooth
Scroll with smooth gestures
### API
scrollSmooth.to(elem|position)
scrollSmooth.to(document.querySelector('.myElem'))
scrollSmooth.to(700)
scrollSmooth.to(elem|position, {
duration,
context,
offset,
ease,
callback,
})
scrollSmooth.to(document.querySelector('.myElem'), {
duration: 1500
offset: 100,
callback: elem => console.log(`Yup! Hi ${elem}!`),
})
scrollSmooth.to(document.querySelector('.another'), {
context: document.querySelector('.parent')
callback: elem => console.log(`Yup! ${elem} inside a context different than window!`),
})