portfolio/composables/scrollToElement.js

5 lines
132 B
JavaScript
Raw Normal View History

2023-02-12 10:59:55 +01:00
export default function (hash) {
const element = document.getElementById(hash)
element.scrollIntoView({ behavior: 'smooth' })
}