You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
special-issue-11-wiki2html/static/title.js

26 lines
616 B
JavaScript

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";
}
});
}
// image grid
function myFunction() {
document.getElementById("myDIV").style.gridTemplateColumns = "100%";
}
function myFunction2() {
document.getElementById("myDIV").style.gridTemplateColumns = "repeat(4, 1fr)";
}