changed the way how data.json is called

This commit is contained in:
IM23a-bachmannj2
2024-09-19 09:35:45 +02:00
parent a120cd7e37
commit c2c51fe8be
3 changed files with 40 additions and 34 deletions
+16
View File
@@ -26,6 +26,22 @@
dropdownContent.style.display = "block";
}
}
// Collapsible functionality for perks, buffs, etc.
document.addEventListener('DOMContentLoaded', function () {
var coll = document.getElementsByClassName("collapsible-header");
for (var i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
}
});
</script>
</head>
<header>