master
E.zn 5 years ago
parent c88d426dea
commit 974933b5f2

@ -10,5 +10,22 @@
</head>
<h1>{{ page.name }}</h1>
<div id="body">{{ body|safe }}</div>
<script>
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
});
}
</script>
</body>
</html>

Loading…
Cancel
Save