-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
19 lines (16 loc) · 488 Bytes
/
main.js
File metadata and controls
19 lines (16 loc) · 488 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
for(j = 0; j < coll.length; j++){
coll[j].classList.remove("active");
}
this.classList.toggle("active");
// if (content.style.maxHeight){
// content.style.maxHeight = null;
// }
// else {
// content.style.maxHeight = content.scrollHeight + "px";
// }
});
}