Added collapsable entries for projects

This commit is contained in:
Michele Tartari
2019-12-22 15:18:20 +01:00
parent 16e731ef9b
commit 6670ea7b77
3 changed files with 239 additions and 264 deletions
+18
View File
@@ -0,0 +1,18 @@
var acc = document.getElementsByClassName("accordion");
var i;
for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function() {
/* Toggle between adding and removing the "active" class,
to highlight the button that controls the panel */
this.classList.toggle("active");
/* Toggle between hiding and showing the active panel */
var panel = this.nextElementSibling;
if (panel.style.maxHeight) {
panel.style.maxHeight = null;
} else {
panel.style.maxHeight = panel.scrollHeight + "px";
}
});
}