1.3.1 • Published 2 years ago

@rndi/makedropdown v1.3.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

makeDropDown

A personal node package that turns a specific HTML element structure into an animated drop down menu.

How to use

  1. Make sure to import the makeDropDown function from the makedropdown package using import().
  2. In your Javascript file, query the html document for the drop down menu element.
    1. Your drop down menu element must have this structure:
    <div class="dropdown">
        <button class="dropbtn">Drop Button Title</button>
        <div class="dropdown-content">
            <ul>
                <li></li>
                <li></li>
                ...
            </ul>
        </div>
    </div>
  3. Call makeDropDown() passing the queried drop down element in as its parameter. For example, assuming you've stored the drop down element in a variable called "dropDownElement", you would call the function like this:
import { makeDropDown } from 'makedropdown';
const dropDownElement = document.querySelector('div.dropdown');
makeDropDown(dropDownElement);
1.3.1

2 years ago

1.3.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago