{"id":18311062,"url":"https://github.com/dmitriyakkerman/nav-menu-js","last_synced_at":"2025-04-09T12:11:04.924Z","repository":{"id":42636870,"uuid":"259629930","full_name":"dmitriyakkerman/nav-menu-js","owner":"dmitriyakkerman","description":"Javascript navigation module for your website, which gives you possibility to get rid of routine.","archived":false,"fork":false,"pushed_at":"2023-01-07T07:59:37.000Z","size":535,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-26T15:05:19.583Z","etag":null,"topics":["javascript","menu","multiple-level-menu","nav","navigation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmitriyakkerman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-28T12:25:28.000Z","updated_at":"2021-09-07T20:10:32.000Z","dependencies_parsed_at":"2023-02-06T15:31:19.986Z","dependency_job_id":null,"html_url":"https://github.com/dmitriyakkerman/nav-menu-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Fnav-menu-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Fnav-menu-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Fnav-menu-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Fnav-menu-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitriyakkerman","download_url":"https://codeload.github.com/dmitriyakkerman/nav-menu-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036066,"owners_count":21037092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","menu","multiple-level-menu","nav","navigation"],"created_at":"2024-11-05T16:16:20.665Z","updated_at":"2025-04-09T12:11:04.904Z","avatar_url":"https://github.com/dmitriyakkerman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/dmitriyakkerman/nav-menu-js.svg?branch=master)](https://travis-ci.org/github/dmitriyakkerman/nav-menu-js)\n\nJavascript navigation module(includes links \"click\" and \"mouseover\" events)\" for your website, which gives you possibility to get rid of routine.\n\n**Example:**\n\n  https://codepen.io/mickyholbrook/pen/GRjqwJj\n\n**Installation:**\n\n***npm***\n\n    npm i nav-menu-js\n    \nLoad the required JS to your entry JS file:\n```js\nlet NavMenu = require('nav-menu-js');   \nor    \nimport NavMenu from 'nav-menu-js';\n```    \nLoad the required stylesheet to your entry CSS file:\n```css   \n@import \"node_modules/nav-menu-js/index\";\n```      \n***Cloning git repository***\n\n    1. Go to your project directory\n    2. git clone https://github.com/dmitriyakkerman/nav-menu-js.git .\n  \n  Put the required stylesheet link in HEAD tag:\n```html  \n\u003clink rel=\"stylesheet\" href=\"./dist/css/nav-menu.min.css\"\u003e\n```    \n  Put the module script at the bottom of your markup: \n```html \n\u003cscript src=\"./dist/js/nav-menu.min.js\"\u003e\u003c/script\u003e  \n```   \n**Usage**\n     \nCreate typical navigation structure with nested lists. \n```html      \n \u003cul class=\"header-nav\" role=\"navigation\" aria-label=\"Header links\"\u003e\n     \u003cli\u003e\n         \u003ca href=\"\"\u003eHome\u003c/a\u003e\n     \u003c/li\u003e\n     \u003cli\u003e\n         \u003ca href=\"\"\u003eAbout\u003c/a\u003e\n     \u003c/li\u003e\n     \u003cli\u003e\n         \u003ca href=\"\"\u003eServices\u003c/a\u003e\n         \u003cul\u003e\n             \u003cli\u003e\n                 \u003ca href=\"\"\u003eService 1\u003c/a\u003e\n             \u003c/li\u003e\n             \u003cli\u003e\n                 \u003ca href=\"\"\u003eService 2\u003c/a\u003e\n                 \u003cul\u003e\n                     \u003cli\u003e\n                         \u003ca href=\"\"\u003eService 2.1\u003c/a\u003e\n                     \u003c/li\u003e\n                     \u003cli\u003e\n                         \u003ca href=\"\"\u003eService 2.2\u003c/a\u003e\n                     \u003c/li\u003e\n                 \u003c/ul\u003e\n             \u003c/li\u003e\n         \u003c/ul\u003e\n     \u003c/li\u003e\n     \u003cli\u003e\n         \u003ca href=\"\"\u003eContact\u003c/a\u003e\n     \u003c/li\u003e\n \u003c/ul\u003e\n```         \n**Initialization**\n\n1. Specify root selector(string or DOM node) in \"nav\" option.\n2. Specify \"preventParentClick\" option for preventing click event on parent links which have child elements(\"false\" by default).\n \nInitialization with script tag\n```js \n\u003cscript\u003e\n       document.addEventListener('DOMContentLoaded', function () {\n         new NavMenu({\n           nav: '.header-nav',\n           preventParentClick: true\n         });\n       });\n\u003c/script\u003e\n```        \nor\n    \nInitialization by creating [filename].js file and connecting in a script tag\n```js        \n// init.js\n\ndocument.addEventListener('DOMContentLoaded', function () {\n new NavMenu({\n   nav: '.header-nav',\n   preventParentClick: true\n });\n}); \n\n\u003cscript src=\"init.js\"\u003e\u003c/script\u003e\n```  \n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriyakkerman%2Fnav-menu-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitriyakkerman%2Fnav-menu-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriyakkerman%2Fnav-menu-js/lists"}