1.0.0 • Published 1 year ago
dropdown-display v1.0.0
dropdown-display
DOM mechanism for displaying and hiding a dropdown menu
Markup/Style:
HTML:
Note: This element could also be a , or whatever other element contains your dropdown content. The important thing is the class 'dropdown-content'
Note: I prefer the look/feel of the button placed under the dropdown content, but this is up to preference
CSS:
.dropdown-content { visibility: hidden; display: none; }
.dropdown-content.visible { visibility: visible; display: block; }
Usage:
index.js import { dropdownDisplay } from './dropdown-display';
1.0.0
1 year ago