-
So you might have thought we could get by without any JS, but we need it a little. Luckily it's the type of script that you can write once and reuse without reconfiguration.
-
The default functionality of the details tab means that it can be toggled open or closed. That's not what we want for tabs. Each details tag must be manually closed and then another opened. We want a tab to stay open and then close when another is picked.
-
By watching for attribute changes and blocking keyboard and mouse input from toggling a details tab when a tab is open, we can emulate the expected tab behavior.
-
Then it's just a matter of toggling the sibling details tags when another is selected.
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tu vero, inquam, ducas licet, si sequetur; Expectoque quid ad id, quod quaerebam, respondeas. Quare attende, quaeso. Cui Tubuli nomen odio non est? Sedulo, inquam, faciam.
+
Conferam tecum, quam cuique verso rem subicias; Ego vero volo in virtute vim esse quam maximam; Sed ego in hoc resisto; Tamen a proposito, inquam, aberramus.
+
Occultum facinus esse potuerit, gaudebit; Verum hoc idem saepe faciamus. Piso igitur hoc modo, vir optimus tuique, ut scis, amantissimus. Itaque ad tempus ad Pisonem omnes. Apparet statim, quae sint officia, quae actiones. Quodsi ipsam honestatem undique pertectam atque absolutam.
+
Duo Reges: constructio interrete. Animum autem reliquis rebus ita perfecit, ut corpus; Aliter enim explicari, quod quaeritur, non potest. Quid autem habent admirationis, cum prope accesseris? Negare non possum. Quid censes in Latino fore?
+
Non laboro, inquit, de nomine. Memini vero, inquam; Hunc vos beatum; Optime, inquam.
+
Restinguet citius, si ardentem acceperit. Cyrenaici quidem non recusant; Tecum optime, deinde etiam cum mediocri amico. Cave putes quicquam esse verius. Igitur neque stultorum quisquam beatus neque sapientium non beatus. Non semper, inquam; Gerendus est mos, modo recte sentiat.