move onclick to js file

This commit is contained in:
Ricardo (XenGi) Band 2023-06-23 01:24:23 +02:00
commit e816bb4d7b
No known key found for this signature in database
3 changed files with 298 additions and 4 deletions

View file

@ -10,10 +10,10 @@ function toggle_gototop() {
}
}
function gototop() {
document.getElementById("gototop").addEventListener("click", function(event) {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}
});
document.addEventListener('DOMContentLoaded', function() {
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);