mirror of
https://github.com/jlengrand/irma-website.git
synced 2026-03-10 08:21:20 +00:00
update collapse
This commit is contained in:
@@ -19,14 +19,13 @@
|
||||
|
||||
for (i = 0; i < coll.length; i++) {
|
||||
coll[i].addEventListener("click", function() {
|
||||
this.classList.toggle("open");
|
||||
this.classList.toggle("active");
|
||||
let content = this.nextElementSibling;
|
||||
if (content.style.display === "block") {
|
||||
content.style.display = "none";
|
||||
if (content.style.maxHeight){
|
||||
content.style.maxHeight = null;
|
||||
} else {
|
||||
content.style.display = "block";
|
||||
}
|
||||
content.style.maxHeight = content.scrollHeight + "px";
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</script>
|
||||
@@ -130,7 +130,8 @@ column.text p {
|
||||
/* Style the collapsible content. Note: hidden by default */
|
||||
.content {
|
||||
padding: 0 18px;
|
||||
display: none;
|
||||
background-color: white;
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
background-color: #f1f1f1;
|
||||
transition: max-height 0.2s ease-out;
|
||||
}
|
||||
Reference in New Issue
Block a user