79633626

Date: 2025-05-22 11:23:24
Score: 0.5
Natty:
Report link

Here is the new script I have:

document.addEventListener("DOMContentLoaded", function () {
var coll = document.getElementsByClassName("collapse");

for (var i = 0; i < coll.length; i++) {
  coll[i].addEventListener("click", function () {
  var content = this.nextElementSibling;
  content.classList.toggle("show");
});
}
});

This got me the display I wanted

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Shyryu