README
What is this?
Build dropdowns for your navigation menu with ease.
Installation
npm i drop-my-menu --save
Usage
The event type is set to 'mouseover' event by default.
You can pass arguments as an object to switch to the 'click' event.
Example:
index.js
import dropMyMenu from 'drop-my-menu';
dropMyMenu({
event_type: 'click'
});
index.html
<nav>
<div class="logo">
<h1>DropDown</h1>
</div>
<ul class="nav-links">
<li>Home</li>
<li class = "drop-this-menu">
Products
<ul class = "dropable">
<li>Best Products</li>
<li>Very Good Products</li>
<li>Amazing Products</li>
</ul>
</li>
<li class = "drop-this-menu">
Contact
<ul class = "dropable">
<li>Best Products</li>
<li>Very Good Products</li>
<li>Amazing Products</li>
</ul>
</li>
<li>About</li>
</ul>
</nav>
Styling
You can style your dropdowns by simply overwriting the default styles using the .dropable
selector.