1.0.4 • Published 1 year ago

drop-down-init v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Drop Down Initializer

Dynamically add drop-down functionality to a collection of HTML elements without external dependencies.

Check out the repo on GitHub here or view the package on npm.

How to Install

Install via npm with the following command:

npm install -S drop-down-init

Using the Module

Import initDropdown from the package. The function accepts an array of menu option objects with the format:

const menuElement = {
  id: '<elementId>',
  href: '<relative path to target>',
};

Add drop-icon to the class list of the drop down menu icon/button.

After the function executes, the drop down menu will become visible on mouseover and each element will redirect to the given path on click. The drop down menu will hide on mouseout or when the menu icon is clicked.

!NOTE This module was completed as part of The Odin Project JavaScript course.

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago