Minor UI fixes
This commit is contained in:
parent
f61bb5cc90
commit
5f2439f42a
@ -2447,3 +2447,13 @@ table {
|
||||
background-attachment: scroll; } }
|
||||
|
||||
/*# sourceMappingURL=main.css.map */
|
||||
|
||||
/*from https://www.w3schools.com/howto/howto_js_collapsible.asp*/
|
||||
|
||||
/* Style the collapsible content. Note: hidden by default */
|
||||
.collapsible-content {
|
||||
padding: 0 18px;
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.2s ease-out;
|
||||
}
|
@ -190,17 +190,17 @@
|
||||
})(jQuery);
|
||||
|
||||
//From https://www.w3schools.com/howto/howto_js_collapsible.asp
|
||||
let collapsibles = document.getElementsByClassName("collapsible");
|
||||
const coll = document.getElementsByClassName("collapsible");
|
||||
let i;
|
||||
|
||||
Array.from(collapsibles).forEach(item => {
|
||||
item.addEventListener("click", function () {
|
||||
this.classList.toggle("collapsible-expanded");
|
||||
let target = item.attributes.getNamedItem("data-target").value;
|
||||
let content = document.getElementById(target);
|
||||
for (i = 0; i < coll.length; i++) {
|
||||
coll[i].addEventListener("click", function() {
|
||||
this.classList.toggle("active");
|
||||
const content = this.nextElementSibling;
|
||||
if (content.style.maxHeight){
|
||||
content.style.maxHeight = null;
|
||||
} else {
|
||||
content.style.maxHeight = content.scrollHeight + "px";
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue
Block a user