]>
Commit | Line | Data |
---|---|---|
8a40e226 TL |
1 | window.addEventListener('DOMContentLoaded', (event) => { |
2 | let activeSection = document.querySelector("a.current"); | |
3 | if (activeSection) { | |
4 | // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView | |
5 | activeSection.scrollIntoView({ block: 'center' }); | |
6 | } | |
7 | }); |