Skip to content

Instantly share code, notes, and snippets.

@ManickYoj
Last active January 22, 2022 03:53
Show Gist options
  • Save ManickYoj/4837dd77d7eb9857e1df670bff70ba97 to your computer and use it in GitHub Desktop.
Save ManickYoj/4837dd77d7eb9857e1df670bff70ba97 to your computer and use it in GitHub Desktop.
<div id="options" data-controller="visibility">
<h1>Toggle Visibility</h1>
<button data-action="visibility#showTargets">Show All Elements</button>
<button data-action="visibility#hideTargets">Hide All Elements</button>
<button data-action="visibility#toggleTargets">Toggle Element Visibility</button>
<p data-visibility-target="hideable">The Flamboyent Thing #1<p/>
<p data-visibility-target="hideable" hidden>The Slightly Stealthy Thing #2<p/>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment