diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 3bd0049..7b374ab 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -46,16 +46,16 @@ const nav_button = document.getElementById("navi-toggle") nav_button.addEventListener("change", event => { if (event.target.checked) { - /* - document.documentElement.style.overflow = "hidden"; - document.body.style.overflow = "hidden"; - */ } if (!event.target.checked) { - /* - document.documentElement.style.overflow = "initial"; - document.body.style.overflow = "initial"; - */ + setTimeout(() => { + document.documentElement.style.overflow = "hidden"; + document.body.style.overflow = "hidden"; + }, 800) + setTimeout(() => { + document.documentElement.style.overflow = "initial"; + document.body.style.overflow = "initial"; + }, 810) } })