From 868dc4d375ffa0cdc16951da3cf3c71fd01511c8 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Tue, 5 Sep 2023 02:05:53 +0300 Subject: Made more clear what is what --- src/js/menu-magic.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/js') diff --git a/src/js/menu-magic.js b/src/js/menu-magic.js index 8ab1bb8..bc48a65 100644 --- a/src/js/menu-magic.js +++ b/src/js/menu-magic.js @@ -6,15 +6,17 @@ */ var upperFloor = document.querySelector('.upper-floor'); var lowerFloor = document.querySelector('.lower-floor'); -var modulesSubmenu = document.querySelector('#modules-submenu'); -modulesSubmenu.style.display = 'none'; upperFloor.style.display = 'flex'; lowerFloor.style.display = 'none'; + +var modulesSubmenu = document.querySelector('#modules-submenu'); +modulesSubmenu.style.display = 'none'; function modulesSubToggle(){ modulesSubmenu.style.display = modulesSubmenu.style.display === 'none' ? 'flex' : 'none'; upperFloor.style.display = upperFloor.style.display === 'none' ? 'flex' : 'none'; lowerFloor.style.display = lowerFloor.style.display === 'none' ? 'flex' : 'none'; } + var exploreSubmenu = document.querySelector('#explore-submenu'); exploreSubmenu.style.display = 'none'; function exploreSubToggle(){ @@ -22,6 +24,8 @@ function exploreSubToggle(){ upperFloor.style.display = upperFloor.style.display === 'none' ? 'flex' : 'none'; lowerFloor.style.display = lowerFloor.style.display === 'none' ? 'flex' : 'none'; } + + // Function to hide all the panes function menuinit(){ menuids.forEach(m=>document.querySelector(m).hidden=true); -- cgit v1.2.3