{"id":13376173,"url":"https://github.com/onokumus/metismenu","last_synced_at":"2025-05-08T22:26:17.891Z","repository":{"id":12213021,"uuid":"14819703","full_name":"onokumus/metismenu","owner":"onokumus","description":"A collapsible jQuery menu plugin","archived":false,"fork":false,"pushed_at":"2024-11-14T21:34:08.000Z","size":1299,"stargazers_count":1961,"open_issues_count":82,"forks_count":482,"subscribers_count":104,"default_branch":"master","last_synced_at":"2025-04-30T12:42:32.835Z","etag":null,"topics":["jquery","jquery-plugin","menu","metismenu"],"latest_commit_sha":null,"homepage":"https://onokumus.github.io/metismenu/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onokumus.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":".github/contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["onokumus"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2013-11-30T11:17:58.000Z","updated_at":"2025-04-17T10:33:31.000Z","dependencies_parsed_at":"2024-12-31T17:00:28.805Z","dependency_job_id":"534bb635-8613-4d23-8743-a7b733c518ed","html_url":"https://github.com/onokumus/metismenu","commit_stats":{"total_commits":257,"total_committers":27,"mean_commits":9.518518518518519,"dds":0.2023346303501945,"last_synced_commit":"8d03f02f709cbd2f1d06f0e3eaa62c32ea64fd45"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onokumus%2Fmetismenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onokumus%2Fmetismenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onokumus%2Fmetismenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onokumus%2Fmetismenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onokumus","download_url":"https://codeload.github.com/onokumus/metismenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252395768,"owners_count":21741086,"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":["jquery","jquery-plugin","menu","metismenu"],"created_at":"2024-07-30T05:02:31.124Z","updated_at":"2025-05-07T22:23:13.701Z","avatar_url":"https://github.com/onokumus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/onokumus"],"categories":["JavaScript"],"sub_categories":[],"readme":"# metismenu [![NPM version](https://img.shields.io/npm/v/metismenu.svg?style=flat)](https://www.npmjs.com/package/metismenu) [![NPM monthly downloads](https://img.shields.io/npm/dm/metismenu.svg?style=flat)](https://npmjs.org/package/metismenu) [![NPM total downloads](https://img.shields.io/npm/dt/metismenu.svg?style=flat)](https://npmjs.org/package/metismenu)\n\n\n\u003e A collapsible jQuery menu plugin\n\u003e \n\u003e This version does not support any version of IE browser.\n\n- [Getting started](#getting-started)\n  * [Install](#install)\n  * [Download](#download)\n- [Usage](#usage)\n  * [Stopping list opening on certain elements](#stopping-list-opening-on-certain-elements)\n    + [toggle](#toggle)\n    + [dispose](#dispose)\n    + [preventDefault](#preventdefault)\n    + [triggerElement](#triggerelement)\n    + [parentTrigger](#parenttrigger)\n    + [subMenu](#submenu)\n- [Events](#events)\n- [Migrating to v3 from v2](#migrating-to-v3-from-v2)\n- [Demo](#demo)\n- [About](#about)\n  * [Related projects](#related-projects)\n  * [Contributors](#contributors)\n  * [Contributing](#contributing)\n  * [Release History](#release-history)\n  * [Author](#author)\n  * [License](#license)\n\n\n## Getting started\n\n### Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\nnpm install --save metismenu\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\nyarn add metismenu\n```\n\nInstall with [composer](https://getcomposer.org/)\n\n```sh\ncomposer require onokumus/metismenu:dev-master\n```\n\n### Download\n\n[download](https://github.com/onokumus/metisMenu/archive/master.zip)\n\n## Usage\n\n1. Include metismenu StyleSheet\n\n  ```html\n  \u003clink rel=\"stylesheet\" href=\"https://unpkg.com/metismenu/dist/metisMenu.min.css\"\u003e\n  \u003c!-- OR --\u003e  \n  \u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/metismenu/dist/metisMenu.min.css\"\u003e\n  ```\n\n1. Include jQuery\n\n  ```html\n  \u003cscript src=\"https://unpkg.com/jquery\"\u003e\u003c/script\u003e\n  \u003c!-- OR --\u003e\n  \u003cscript src=\"https://cdn.jsdelivr.net/npm/jquery\"\u003e\u003c/script\u003e\n  ```\n\n1. Include metisMenu plugin's code\n\n  ```html\n  \u003cscript src=\"https://unpkg.com/metismenu\"\u003e\u003c/script\u003e\n  \u003c!-- OR --\u003e\n  \u003cscript src=\"https://cdn.jsdelivr.net/npm/metismenu\"\u003e\u003c/script\u003e\n  ```\n\n1. Add id attribute to unordered list\n\n  ```html\n  \u003cul id=\"metismenu\"\u003e\n\n  \u003c/ul\u003e\n  ```\n\n1. Make expand/collapse controls accessible\n\n\u003e Be sure to add `aria-expanded` to the element `a`. This attribute explicitly defines the current state of the collapsible element to screen readers and similar assistive technologies. If the collapsible element is closed by default, it should have a value of `aria-expanded=\"false\"`. If you've set the collapsible element's parent `li` element to be open by default using the `mm-active` class, set `aria-expanded=\"true\"` on the control instead. The plugin will automatically toggle this attribute based on whether or not the collapsible element has been opened or closed.\n\n  ```html\n  \u003cul id=\"metismenu\"\u003e\n    \u003cli class=\"mm-active\"\u003e\n      \u003ca href=\"#\" aria-expanded=\"true\"\u003eMenu 1\u003c/a\u003e\n      \u003cul\u003e\n      ...\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#\" aria-expanded=\"false\"\u003eMenu 2\u003c/a\u003e\n      \u003cul\u003e\n      ...\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    ...\n    \u003c/ul\u003e\n  ```\n\n1. Arrow Options\n\n\u003e add `has-arrow` class to `a` element\n\n  ```html\n  \u003cul id=\"metismenu\"\u003e\n  \u003cli class=\"mm-active\"\u003e\n    \u003ca class=\"has-arrow\" href=\"#\" aria-expanded=\"true\"\u003eMenu 1\u003c/a\u003e\n    \u003cul\u003e\n    ...\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\n    \u003ca class=\"has-arrow\" href=\"#\" aria-expanded=\"false\"\u003eMenu 2\u003c/a\u003e\n    \u003cul\u003e\n    ...\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  ...\n  \u003c/ul\u003e\n  ```\n\n1. Call the plugin:\n\n  ```javascript\n    $(\"#metismenu\").metisMenu();\n  ```\n\n### Stopping list opening on certain elements\n\nSetting aria-disabled=\"true\" in the `\u003ca\u003e` element as shown will stop metisMenu opening the menu for that particular list. This can be changed dynamically and will be obeyed correctly:\n\n```html\n\u003ca href=\"#\" aria-expanded=\"false\" aria-disabled=\"true\"\u003eList 1\u003c/a\u003e\n```\n\n#### toggle\n\nType: `Boolean`\nDefault: `true`\n\nFor auto collapse support.\n\n```javascript\n $(\"#metismenu\").metisMenu({\n   toggle: false\n });\n```\n\n#### dispose\n\nType: `String`\nDefault: `null`\n\nFor stop and destroy metisMenu.\n\n```javascript\n $(\"#metismenu\").metisMenu('dispose');\n```\n\n#### preventDefault\n\nType: `Boolean`\nDefault: `true`\n\n\u003e Prevents or allows dropdowns' onclick events after expanding/collapsing.\n\n  ```javascript\n   $(\"#menu\").metisMenu({\n     preventDefault: false\n   });\n  ```\n\n_since from version 2.7.0_\n\n#### triggerElement\n\nType: `jQuery selector`\nDefault: `a`\n\n```javascript\n $(\"#metismenu\").metisMenu({\n   triggerElement: '.nav-link' // bootstrap 5\n });\n```\n\n#### parentTrigger\n\nType: `jQuery selector`\nDefault: `li`\n\n```javascript\n $(\"#metismenu\").metisMenu({\n   parentTrigger: '.nav-item' // bootstrap 5\n });\n```\n\n#### subMenu\n\nType: `jQuery selector`\nDefault: `ul`\n\n```javascript\n $(\"#metismenu\").metisMenu({\n   subMenu: '.nav.flex-column' // bootstrap 5\n });\n```\n\n## Events\n\n|**Event Type**      |**Description**|\n|--------------|--------------|\n|show.metisMenu    |This event fires immediately when the `_show` instance method is called.|\n|shown.metisMenu   |This event is fired when a collapse `ul` element has been made visible to the user (will wait for CSS transitions to complete).|\n|hide.metisMenu    |This event is fired immediately when the `_hide` method has been called. |\n|hidden.metisMenu  |This event is fired when a collapse `ul` element has been hidden from the user (will wait for CSS transitions to complete).|\n\n## Migrating to v3 from v2\n\n* Update `metisMenu.js` \u0026 `metisMenu.css` files\n* Change `active` class to `mm-active`\n\n## Demo\n\n[http://mm.onokumus.com](http://mm.onokumus.com)\n\nContains a simple HTML file to demonstrate metisMenu plugin.\n\n## About\n\n### Related projects\n\n* [@metismenu/react](https://www.npmjs.com/package/@metismenu/react): react component for MetisMenu | [homepage](https://github.com/onokumus/metismenu-react#readme \"react component for MetisMenu\")\n* [metismenujs](https://www.npmjs.com/package/metismenujs): MetisMenu with Vanilla-JS | [homepage](https://github.com/onokumus/metismenujs#readme \"MetisMenu with Vanilla-JS\")\n\n### Contributors\n\n| **Contributor** |  \n| --- |  \n|[onokumus](https://github.com/onokumus) |  \n| [diegozhu](https://github.com/diegozhu) |  \n| [sinabs](https://github.com/sinabs) |  \n|[DrugoLebowski](https://github.com/DrugoLebowski) |  \n| [BurkovBA](https://github.com/BurkovBA) |  \n| [arthurtalkgoal](https://github.com/arthurtalkgoal) |  \n| [mrdziuban](https://github.com/mrdziuban) |  \n| [nicolasigot](https://github.com/nicolasigot) |  \n| [PeterDaveHello](https://github.com/PeterDaveHello) |  \n|  [kalidema](https://github.com/kalidema) |  \n|  [AndrewEastwood](https://github.com/AndrewEastwood) |  \n|  [rgnevashev](https://github.com/rgnevashev) |  \n|  [719media](https://github.com/719media) |  \n| [chriswiggins](https://github.com/chriswiggins) |  \n| [jmagnusson](https://github.com/jmagnusson) |  \n| [LukasDrgon](https://github.com/LukasDrgon) |  \n| [Cediddi](https://github.com/Cediddi) |  \n|  [WoMayr](https://github.com/WoMayr) |  \n|  [capynet](https://github.com/capynet) |  \n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n### Release History\n\n|**DATE**      |**VERSION**   |**CHANGES**|\n|--------------|--------------|-----------|\n|2021-05-16    |v3.0.7        |sass support|\n|2020-03-22    |v3.0.6        |fix security vulnerabilities|\n|2019-12-28    |v3.0.5        |Fix dispose to be similar to init (adding event) [#184](https://github.com/onokumus/metismenu/pull/184)|\n|2019-03-07    |v3.0.4        |fix|\n|2018-10-05    |v3.0.3        |fix|\n|2018-10-05    |v3.0.2        |fix|\n|2018-10-05    |v3.0.1        |fix|\n|2018-10-05    |v3.0.0        |more functionally|\n|2018-10-05    |v2.7.9.1      |Fix dispose option [#173](https://github.com/onokumus/metismenu/pull/173)|\n|2018-06-28    |v2.7.9        |Make jquery a peer dependency|\n|2018-06-14    |v2.7.8        |remove aria-expanded attribute \u0026 remove transitionend check|\n|2018-02-14    |v2.7.4        |jQuery -\u003e $ in src/metisMenu.js to fix import. [#158](https://github.com/onokumus/metismenu/pull/158)|\n|2018-02-14    |v2.7.3        |window might not be defined in node.js environment [#156](https://github.com/onokumus/metismenu/pull/156)|\n|2017-12-31    |v2.7.2        |isolate against bootstrap changes, remove old legacy ie9 code [#154](https://github.com/onokumus/metismenu/pull/154)|\n|2017-10-30    |v2.7.1        |added check in complete()-callback to break when menu was disposed [#150](https://github.com/onokumus/metismenu/pull/150)|\n|2017-03-08    |v2.7.0        |fixed `has-arrow` class border color \u0026 added new 3 options|\n|2017-02-23    |v2.6.3        |fixed #129|\n|2017-02-02    |v2.6.2        |doubleTapToGo option is deprecated|\n|2016-12-06    |v2.6.1        |fix require.js|\n|2016-11-29    |v2.6.0        |dispose support|\n|2016-05-06    |v2.5.2        |fix Menu failed to remove collapsing class|\n|2016-05-06    |v2.5.1        |fixed bootstrap conflict|\n|2016-03-31    |v2.5.0        |Event support|\n|2016-03-11    |v2.4.3        |create meteor package|\n|2016-03-04    |v2.4.2        |back to version 2.4.0|\n|2016-03-03    |v2.4.1        |\u003cdel\u003eTransition element passed to methods\u003c/del\u003e (removed)|\n|2016-01-25    |v2.4.0        |Support AMD / Node / CommonJS|\n|2016-01-08    |v2.3.0        |Adding aria-disabled=true to the link element prevents the dropdown from opening|\n|2015-09-27    |v2.2.0        |Events supported \u0026 added preventDefault options|\n|2015-08-06    |v2.1.0        |RTL \u0026 `aria-expanded` attribute \u0026 TypeScript type definitions support|\n|2015-07-25    |v2.0.3        |When the active item has doubleTapToGo should not collapse|\n|2015-05-23    |v2.0.2        |[fixed](https://github.com/onokumus/metisMenu/issues/34#issuecomment-104656754)|\n|2015-05-22    |v2.0.1        |changeable classname support|\n|2015-04-03    |v2.0.0        |Remove Bootstrap dependency|\n|2015-03-24    |v1.1.3        |composer support|\n|2014-11-01    |v1.1.3        |Bootstrap 3.3.0|\n|2014-07-07    |v1.1.0\t      |Add double tap functionality|\n|2014-06-24    |v1.0.3\t      |cdnjs support \u0026 rename plugin|\n|2014-06-18    |v1.0.3        |Create grunt task|\n|2014-06-10    |v1.0.2        |Fixed for IE8 \u0026 IE9|\n\n### Author\n\n**Osman Nuri Okumus**\n\n* [GitHub Profile](https://github.com/onokumus)\n* [Twitter Profile](https://twitter.com/onokumus)\n* [LinkedIn Profile](https://linkedin.com/in/onokumus)\n\n### License\n\nCopyright © 2021, [Osman Nuri Okumus](https://github.com/onokumus).\nReleased under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonokumus%2Fmetismenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonokumus%2Fmetismenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonokumus%2Fmetismenu/lists"}