File: /home/ohirex/web/ohirex.com/public_html/join/scripts/replaceanchorswithsmoothscroll.js
<script>
document.addEventListener('DOMContentLoaded', function() {
const anchors = document.querySelectorAll('a[href*="#"]')
for (let anchor of anchors) {
anchor.removeAttribute('onclick');
anchor.addEventListener('click', function (e) {
e.preventDefault()
const blockID = anchor.getAttribute('href').substr(1)
document.getElementById(blockID).scrollIntoView({
behavior: 'smooth',
block: 'start'
})
})
}
});
</script>