drop-menu-package
Version:
change attribute to the target to make the menu drop-down
23 lines (13 loc) • 718 B
Markdown
# drop-down-menu
function who make a menu dropdown with a trigger button
## How to use
### JS
<code>- import {toggleMenu} from './drop-menu-package';</code> <br>
<code>toggleMenu(trigger, target);</code>
<code> trigger </code> (node) : More likely a button wich can receive an "click" eventListener <br>
<code> target </code> (node) : Menu that will dropdown from the trigger <br>
the function will activate the trigger with an "click" eventListener
### CSS
You'll need to position thoses two elements like you want and the function's only to display the menu. <br>
It uses height property at 100% to make it appeared. <br>
It's up to you to setup your container at the right height to suit your need. <br>