Talk to Our Team
'; parents[0].innerHTML = newContent; } } }); } const btn = document.querySelector('.navbar-toggler'); const menu = document.querySelector('.span_9 '); const body = document.querySelector('body'); btn.addEventListener('click', () => { if (btn.classList.contains('collapsed')) { btn.classList.remove('collapsed'); menu.classList.remove('collapsed'); } else { btn.classList.add('collapsed'); menu.classList.add('collapsed'); } }) document.querySelectorAll(".hs-menu-depth-1.hs-item-has-children ").forEach(link => { const a = link.querySelector('a') a.removeAttribute("href") }); const specifiedElement = document.querySelectorAll('.hs-menu-children-wrapper') const header = document.querySelectorAll('.header-updated-menu') const menuItemDepth1 = document.getElementsByClassName('hs-menu-depth-1 active'); document.addEventListener('click', event => { const isClickInside = specifiedElement[0].contains(event.target) const isClickInsideHeader = header[0].contains(event.target) if(menuItemDepth1[0]){ if (!isClickInsideHeader ) { if (!isClickInside ) { menuItemDepth1[0].classList.remove('active'); } } } })

WorkTango Blog