Skip to content

Files

Latest commit

 

History

History
11 lines (11 loc) · 701 Bytes

72.md

File metadata and controls

11 lines (11 loc) · 701 Bytes
title date submitter number tags discussion
I want an easy way to revert an element to its original `display` setting
2019-09-13 23:48:00 UTC
Tobias Buschor
72
css
javascript

If you are building toggles (or similar interfaces) you often need to make adjustments to an element’s display property. Often this requires tracking the element’s initial CSS display value before setting it to "none" so you can switch it back later. It would be nice to have a mechanism by which you could reset an element’s display property (and potentially other properties) without having to know what the original setting was.