Commit 9318b1e3 authored by Hanna Schraffenberger's avatar Hanna Schraffenberger
Browse files

better is better

parent b11e6e60
......@@ -4,11 +4,11 @@
<div class="column">
{% for faq_item in section.faq_items %}
<button class="collapsible">{{ faq_item.question }}</button>
<div class="content faq-item">
<p>{{ faq_item.answer }}</p>
</div>
<div class="content faq-item">
<p>{{ faq_item.answer }}</p>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
......@@ -16,16 +16,16 @@
<script>
let coll = document.getElementsByClassName("collapsible");
let i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
coll[i].addEventListener("click", function () {
this.classList.toggle("open");
let content = this.nextElementSibling;
if (content.style.maxHeight){
if (content.style.maxHeight) {
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
}
});
}
</script>
\ No newline at end of file
</script>
\ No newline at end of file
......@@ -25,7 +25,8 @@ header {
/* Double call to action */
.button.primary.inverted {
margin-right: 1px;
margin-right: 10px;
margin-bottom: 5px;
}
/* Overwriting colors */
......@@ -144,6 +145,6 @@ column.text p {
margin-left: 5px;
}
.collapsible .active:after {
.open:after {
content: "\2796"; /* Unicode character for "minus" sign (-) */
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment