diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 92ff5ec46477ce25a80a25883295a2dc840da184..72888493e3ef8762bc7c2aaeee865af0aee0abb3 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -160,7 +160,13 @@ function manageAccordionByStep(){ for (i = 0; i < acc.length; i++) { acc[i].addEventListener("click", function() { - this.classList.toggle("active"); + if (this.classList.contains("active") == true){ + this.classList.remove("active") + this.nextElementSibling.querySelector("sib-form + div").style.maxHeight = "0px"; + }else{ + this.classList.add("active") + } + this.closest(".step").querySelector('nav').removeAttribute("hidden"); refreshPagination()