demo Click to open/closeHere is the content that is revealed when clicking the summary… details.addEventListener(«toggle», () => { details.open ? thisCoolThing() : thisOtherThing(); })Show/Hide contentAll the content here