web/public/res/anchors.js

4 lines
128 B
JavaScript
Raw Normal View History

2024-03-29 16:17:59 +01:00
document.querySelectorAll("h2")
.forEach(e => {
e.onclick = () => window.location.hash = e.parentElement.id;
});