UNPKG

test-show-menu

Version:

Quick drop down menu for TOP project

16 lines (9 loc) 603 B
# For dropdown and burger menu ## Purpose To practice npm creation and usage. Assign an event listener which will toogle a class of an element. It works either on click or on hover. For click the last argument must be "click", for hover any other word. First argument is the element to which the event listener will be assigned. Second argument is the element for which a class will be toogled. Third argument is the class to be toogled. ## Installation `npm install test-show-menu` ## Usage example ```javascript showClass('.burger-menu', '.nav-links', 'side-links', 'click'); ```