1
0
Fork 0
mirror of https://github.com/treffynnon/sqlstyle.guide.git synced 2025-03-09 12:49:51 -05:00

Update scripts.js

This commit is contained in:
Simon Holywell 2019-11-04 11:05:06 +10:00 committed by GitHub
parent 167a5ce46c
commit 14bf5e3ca5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
target = document.getElementById(targetId || 'translation-bar');
if (target) {
e.preventDefault();
window.location.hash = e.target.hash;
target.scrollIntoView({behavior: 'smooth', block: 'start'});
}
}));
@ -81,4 +82,4 @@ document.addEventListener('DOMContentLoaded', () => {
}
}
}
})();
})();