{"id":15361542,"url":"https://github.com/jonathanong/delegated-dropdown","last_synced_at":"2026-01-20T11:03:19.600Z","repository":{"id":14295538,"uuid":"17004001","full_name":"jonathanong/delegated-dropdown","owner":"jonathanong","description":"mobile-first delegated dropdown menus with smart positioning","archived":false,"fork":false,"pushed_at":"2014-04-04T02:12:30.000Z","size":184,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T20:21:34.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jonathanong.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":"2014-02-20T00:17:32.000Z","updated_at":"2014-06-01T18:46:52.000Z","dependencies_parsed_at":"2022-09-16T00:41:23.790Z","dependency_job_id":null,"html_url":"https://github.com/jonathanong/delegated-dropdown","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanong%2Fdelegated-dropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanong%2Fdelegated-dropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanong%2Fdelegated-dropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanong%2Fdelegated-dropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanong","download_url":"https://codeload.github.com/jonathanong/delegated-dropdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492549,"owners_count":20947545,"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":[],"created_at":"2024-10-01T12:55:34.093Z","updated_at":"2026-01-20T11:03:14.581Z","avatar_url":"https://github.com/jonathanong.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Delegated Dropdown\n\nMobile-first delegated dropdown menus with smart positioning.\n\n- Handles tap events\n- Opens the dropdowns either up or down\n- Justifies the content either to the left or the right of the parent\n- `esc` closes all dropdowns\n- Only one dropdown menu open at a time\n\nCaveats:\n\n- You may need to set `overflow: hidden`\n- You need to handle `:hover` states yourself\n\n## API\n\n```jade\n.Dropdown(.open)(.up)(.down)(.left)(.right)\n  .Dropdown-toggle\n  .Dropdown-menu\n    .Dropdown-item\n```\nView [index.css](https://github.com/jonathanong/delegated-dropdown/blob/master/lib/index.css) for the HTML structure.\n\n```js\nvar dropdown = require('delegated-dropdown')\n```\n\nNote that these methods are completely optional.\n\n### dropdown.on(event)\n\nDropdown is an emitter. The events are:\n\n- `open \u003cdropdown\u003e` - when a dropdown is opened\n- `close \u003cdropdown\u003e` - when a dropdown is closed\n\n### dropdown.position(el)\n\nPositions a `.Dropdown` element.\n\nIf you do not position your dropdowns, you probably want to set `overflow: hidden` to prevent any accidental scroll bars.\n\n### dropdown.open(el)\n\n### dropdown.close(el)\n\n### dropdown.clear()\n\nClears all dropdown menus.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Jonathan Ong me@jongleberry.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanong%2Fdelegated-dropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanong%2Fdelegated-dropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanong%2Fdelegated-dropdown/lists"}