Initial commit

This commit is contained in:
2021-07-02 15:30:45 +02:00
parent 26aec639e5
commit d49db34a1c
26 changed files with 1166 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
document.addEventListener("DOMContentLoaded", function(){
// Fetch all the details element.
const details = document.querySelectorAll("details");
// Add the onclick listeners.
details.forEach((targetDetail) => {
targetDetail.addEventListener("click", () => {
// Close all the details that are not targetDetail.
details.forEach((detail) => {
if (detail !== targetDetail) {
detail.removeAttribute("open");
}
});
});
});
});