How can I detect when a details element is opened or closed in Javascript? Other than attaching a listener to the click function and checking if the open attribute is set or
In jQuery you can catch the event using .on('toggle') like this:
.on('toggle')
$('#detail-id').on('toggle', function() { //code });