Fix broken CSS
This commit is contained in:
parent
e87bc85a9b
commit
9333e5a14d
7 changed files with 64 additions and 7 deletions
|
|
@ -5,11 +5,19 @@
|
|||
let menuOpen = false;
|
||||
|
||||
const toggleSubMenu = (el) => {
|
||||
$(`[for="${el.getAttribute("from")}"`).toggle("slide", "down");
|
||||
|
||||
let icon = el.querySelector("i.fa");
|
||||
let isOpen = icon.hasAttribute("submenuOpen") ? parseInt(icon.getAttribute("submenuOpen")) : 0;
|
||||
|
||||
|
||||
document.querySelectorAll(`[for=${el.getAttribute("from")}]`).forEach((elSearched) => {
|
||||
if (isOpen == 1) {
|
||||
elSearched.classList.remove("visible");
|
||||
} else {
|
||||
elSearched.classList.add("visible");
|
||||
}
|
||||
});
|
||||
|
||||
if (isOpen == 1) {
|
||||
icon.style.transition = "transform ease-in-out 250ms";
|
||||
icon.style.transform = "rotate(0deg)";
|
||||
|
|
@ -41,7 +49,6 @@ window.addEventListener("DOMContentLoaded", (evt) => {
|
|||
|
||||
el.querySelectorAll(".compact.sub.item").forEach((child) => {
|
||||
child.setAttribute("for", id);
|
||||
child.style.display = "none";
|
||||
child.textContent = `${child.textContent}`;
|
||||
el.parentElement.appendChild(child);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue