I'm trying to hide the "collapsible" button after it is being pressed.
activities.html:
<button class="collapsible"> <i class="fa fa-angle-down"></i></a></button>
Controller.js:
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var gallery1 = this.nextElementSibling;
if (gallery1.style.maxHeight){
gallery1.style.maxHeight = null;
} else {
gallery1.style.maxHeight = gallery1.scrollHeight + "px";
}
});
}
I would highly appreciate if someone could help me out of this!