fix swap
This commit is contained in:
parent
84dde04352
commit
8ed037123c
@ -64,6 +64,7 @@ import { Menu } from "lucide-astro";
|
||||
const navMobile = document.getElementById("nav-mobile")!;
|
||||
const navButtons = navMobile.children;
|
||||
|
||||
const init = () => {
|
||||
button.addEventListener("click", () => {
|
||||
if (navMobile.classList.contains("hidden")) {
|
||||
animate(
|
||||
@ -86,4 +87,11 @@ import { Menu } from "lucide-astro";
|
||||
|
||||
navMobile.classList.toggle("hidden");
|
||||
});
|
||||
};
|
||||
|
||||
init();
|
||||
|
||||
document.addEventListener("astro:after-swap", () => {
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user