Commit f3224d00 by Simone

aggiunto script per gestione hashtagged link

parent 95d49e14
......@@ -16,6 +16,7 @@ const LaniakeaModule = (function ($) {
const header = document.querySelector("#main-header");
const logo = document.querySelector("#main-header #logo");
const mobileBurger = document.querySelector(".mobile-burger");
const mainMenuLinks = document.querySelectorAll("#main-header .menu-item");
const linesBurger = document.querySelectorAll(
".mobile-burger .burger-line"
......@@ -61,6 +62,14 @@ const LaniakeaModule = (function ($) {
false
);
mainMenuLinks.forEach((mnu) =>
mnu.addEventListener("click", function () {
if (window.location.href.indexOf("#") != -1) {
document.body.classList.remove("menu-mobile-open");
}
})
);
mobileBurger.addEventListener("click", function (event) {
document.body.classList.toggle("menu-mobile-open");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment