Introduction
Toggle the visibility of a block-level selector from a button located anywhere in the DOM.
The Collapse Relationship
The collapse mechanism establishes a relationship between a button and its target selector. With each button press, the target's visibility toggles between show and hide.
Line # | Details |
---|---|
3-5 | On a The The |
11-13 | The The The |
Close Target
To close a selector while opening another, add the data-target-close
attribute to a button. The value should equal the target selector's id
attribute.