document.addEventListener("DOMContentLoaded", function() { // Select all terms that have children within the IKS menu const parentTerms = document.querySelectorAll('.iksm-term--has-children'); parentTerms.forEach(term => { // Add the expanded class to the term wrapper term.classList.add('iksm-term--expanded'); // Find the corresponding tree container and make it visible const treeTree = term.querySelector('.iksm-terms-tree'); if (treeTree) { treeTree.style.display = 'block'; } }); });