{"id":16346925,"url":"https://github.com/simonsmith/jquery-accordion","last_synced_at":"2025-10-11T02:32:00.419Z","repository":{"id":5178728,"uuid":"6352890","full_name":"simonsmith/jquery-accordion","owner":"simonsmith","description":"Simple accordion, suitable for responsive design","archived":false,"fork":false,"pushed_at":"2013-02-22T22:11:42.000Z","size":132,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-18T08:37:24.415Z","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":"emilsjolander/StickyListHeaders","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonsmith.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":"2012-10-23T13:39:29.000Z","updated_at":"2017-08-07T16:27:20.000Z","dependencies_parsed_at":"2022-07-06T18:32:41.481Z","dependency_job_id":null,"html_url":"https://github.com/simonsmith/jquery-accordion","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/simonsmith%2Fjquery-accordion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsmith%2Fjquery-accordion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsmith%2Fjquery-accordion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsmith%2Fjquery-accordion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonsmith","download_url":"https://codeload.github.com/simonsmith/jquery-accordion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239565664,"owners_count":19660158,"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-11T00:38:38.442Z","updated_at":"2025-10-11T02:31:55.388Z","avatar_url":"https://github.com/simonsmith.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jQuery Accordion\nA really simple accordion that I wrote for a work project because the jQuery UI version requires 1500+ lines of code, and that's unacceptable for responsive design.\n\n## Usage\nTwo ways:\n\n__AMD Style__ (better!)\n\n```js\nrequire(['path/to/Accordion'], function(Accordion) {\n\tnew Accordion('.some-container', {\n\t\t// options\n\t})\n});\n```\nEnsure you have set a path to `jquery` in `require.config` (but you knew that already!)\n\n__Standard Style__ (less awesome)\n\n```js\n$.accordion('.some-container', {\n   // options\n});\n```\nDoesn't really follow the traditional jQuery plugin style, but I prefer AMD so this was just a quick addition for non-AMD users :)\n\n## Methods\nSupports `openAllPanes` and `closeAllPanes`\n\nExample\n```js\nvar accord = $.accordion('.selector');\n\n$('button.open').on('click', function(){\n    accord.openAllPanes();\n});\n\n$('button.close').on('click', function(){\n    accord.closeAllPanes();\n})​;\n```\n\n## Options\n\n```js\n{\n\t // Currently open pane\n    openClass: 'is-active-pane',   \n     \n    // Attached to the container when accordion is ready\n    activeClass: 'accordion-active', \n    \n\t// Anything that can be passed to jQuery animations  \n    animSpeed: 'fast',\n    \n\t// Which pane to open by default\n    openPane: 0,\n    \n\t// What elements to use\n    selectors: {\n        item: '.accordion-item',\n        header: '.accordion-header',\n        content: '.accordion-content'\n    }\n}\n```\n\n## Demo\n\nFiddle away! - http://jsfiddle.net/Blink/QwX8J/\n\nTest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsmith%2Fjquery-accordion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonsmith%2Fjquery-accordion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsmith%2Fjquery-accordion/lists"}