Team:TUDelft/javascript/removal

var coll = document.getElementsByClassName("collapsible"); var i;

for (i = 0; i < coll.length; i++) {

 coll[i].addEventListener("click", function() {
   this.classList.toggle("activedropdown");
   var content = this.nextElementSibling;
   if (content.style.maxHeight){
     content.style.maxHeight = null;
   } else {
     content.style.maxHeight = content.scrollHeight + "px";
   } 
 });

}