- 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 }); } }
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.-
edysmp →
committed 0826fceb on 1.0.x
Issue #3358178 by coaston, edysmp: collapsible automatic
-
edysmp →
committed 0826fceb on 1.0.x
- Status changed to Fixed
9 months ago 10:01pm 2 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.