25 lines
634 B
JavaScript
25 lines
634 B
JavaScript
|
function openCategory(DOM) {
|
||
|
DOM.parentNode.children[1].classList.remove("hidden");
|
||
|
}
|
||
|
|
||
|
function closeCategory(DOM) {
|
||
|
DOM.parentNode.children[1].classList.add("hidden");
|
||
|
}
|
||
|
|
||
|
function toggleCategory(DOM) {
|
||
|
let classes = DOM.parentNode.children[1].classList;
|
||
|
classes[classes.contains("hidden") ? "remove" : "add"]("hidden");
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
function postPageLoad() {
|
||
|
let ent = document.getElementById("sidenav").children[1].children[0].children[0].children;
|
||
|
|
||
|
for (let i = 0; i < ent.length; i++) {
|
||
|
if (!ent[i].children[0].classList.contains("item"))
|
||
|
continue;
|
||
|
|
||
|
ent[i].children[0].onclick = toggleCategory(ent[i].children[0]);
|
||
|
}
|
||
|
}
|
||
|
*/
|