5 lines
134 B
JavaScript
5 lines
134 B
JavaScript
const smoothScroll = element =>
|
|
document.querySelector(element).scrollIntoView({
|
|
behavior: 'smooth'
|
|
});
|
|
module.exports = smoothScroll; |