var acc = document.getElementsByClassName("accordion"); var i; for (i = 0; i < acc.length; i++) { acc[i].addEventListener("click", function() { this.classList.toggle("active"); var subMenu = this.nextElementSibling; if (subMenu.style.maxHeight) { subMenu.style.maxHeight = null; } else { subMenu.style.maxHeight = subMenu.scrollHeight + "px"; } }); } function nordbahnview(){ var viewp = vcs.vcm.Framework.getInstance().viewpoints.NordBView vcs.vcm.Framework.getInstance().getActiveMap().gotoViewPoint(viewp); }