- Issue created by @coaston
- 🇳🇮Nicaragua edysmp Nicaragua
+1
Something like this will do it.
const All_Details = document.querySelectorAll('details'); All_Details.forEach(deet=>{ deet.addEventListener('toggle', toggleOpenOneOnly) }) function toggleOpenOneOnly(e) { if (this.open) { All_Details.forEach(deet=>{ if (deet!=this && deet.open) deet.open = false }); } }
- 🇸🇰Slovakia coaston
Hi edysmp
Any patch or guide where to add this code?
This would be very useful. Or maybe add radio button so it is optional in display settings. - Status changed to Fixed
over 1 year ago 10:01pm 2 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.