{"id":20635663,"url":"https://github.com/schascha/beefup","last_synced_at":"2025-08-04T21:38:27.879Z","repository":{"id":18343051,"uuid":"21522735","full_name":"Schascha/BeefUp","owner":"Schascha","description":"Just a jQuery accordion plugin","archived":false,"fork":false,"pushed_at":"2024-10-01T05:11:24.000Z","size":3004,"stargazers_count":44,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T10:14:09.421Z","etag":null,"topics":["accordion","collapsible","css","javascript","jquery","plugin"],"latest_commit_sha":null,"homepage":"https://schascha.github.io/BeefUp/","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/Schascha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2014-07-05T15:33:09.000Z","updated_at":"2025-04-15T10:44:25.000Z","dependencies_parsed_at":"2024-01-18T08:45:36.645Z","dependency_job_id":"6c8396f3-6ec2-43fe-889b-222379f1ad0a","html_url":"https://github.com/Schascha/BeefUp","commit_stats":{"total_commits":347,"total_committers":4,"mean_commits":86.75,"dds":0.5936599423631124,"last_synced_commit":"63afd6c22b639cc53d941ac4cefa20098d3f5280"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schascha%2FBeefUp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schascha%2FBeefUp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schascha%2FBeefUp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schascha%2FBeefUp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Schascha","download_url":"https://codeload.github.com/Schascha/BeefUp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251683357,"owners_count":21626953,"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":["accordion","collapsible","css","javascript","jquery","plugin"],"created_at":"2024-11-16T15:05:56.557Z","updated_at":"2025-04-30T10:14:16.692Z","avatar_url":"https://github.com/Schascha.png","language":"JavaScript","funding_links":["https://www.paypal.me/LosZahlos"],"categories":[],"sub_categories":[],"readme":"# BeefUp\n\n[![Build](https://github.com/Schascha/BeefUp/workflows/Build/badge.svg)](https://github.com/Schascha/BeefUp/actions)\n[![npm](https://img.shields.io/npm/v/beefup)](https://www.npmjs.com/package/beefup)\n[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/beefup/badge)](https://www.jsdelivr.com/package/npm/beefup)\n[![install size](https://packagephobia.com/badge?p=beefup)](https://packagephobia.com/result?p=beefup)\n\n\u003e Just a jQuery accordion plugin\n\nhttps://schascha.github.io/BeefUp/\n\n**Examples:**\n\n* [Toggle buttons](https://jsfiddle.net/Schascha/2Lzmfdb1/)\n* [Hashchange](http://jsfiddle.net/Schascha/kovejmab/)\n* [CSS animations](https://jsfiddle.net/Schascha/ohb07vzq/)\n* [Self block](https://jsfiddle.net/Schascha/cek0g8ah/)\n\n## Installation\n\nYou can use BeefUp in your project by installing it using [npm](https://www.npmjs.com/package/beefup):\n\n```sh\nnpm install beefup --save\n```\n\n## Usage\n\n1. Include jQuery\n\n    ```html\n    \u003cscript src=\"dist/js/jquery.min.js\"\u003e\u003c/script\u003e\n    ```\n\n2. Include plugin\n\n    ```html\n    \u003cscript src=\"dist/js/jquery.beefup.min.js\"\u003e\u003c/script\u003e\n    ```\n\n3. Add styles\n\n    ```html\n    \u003clink rel=\"stylesheet\" href=\"dist/css/jquery.beefup.css\"\u003e\n    ```\n\n4. Add markup\n\n    ```html\n    \u003carticle class=\"beefup\"\u003e\n        \u003ch2 class=\"beefup__head\"\u003eHeadline\u003c/h2\u003e\n        \u003cdiv class=\"beefup__body\"\u003eMy fancy collapsible content.\u003c/div\u003e\n    \u003c/article\u003e\n    ```\n\n5. Call the plugin\n\n    ```html\n    \u003cscript\u003e\n        $(function() {\n            $('.beefup').beefup();\n        });\n    \u003c/script\u003e\n    ```\n\n## Configuration\n\nOption\t\t\t| Type\t\t| Default\t\t\t| Description\n---\t\t\t\t| ---\t\t| ---\t\t\t\t| ---\naccessibility\t| boolean\t| true\t\t\t\t| Enable accessibility features like tab control\ntrigger\t\t\t| string\t| '.beefup__head'\t| Selector of the trigger element\ncontent\t\t\t| string\t| '.beefup__body'\t| Selector of the collapsible content\nopenClass\t\t| string\t| 'is-open'\t\t\t| Name of the class which shows if a accordion is triggered or not\nanimation\t\t| string\t| 'slide'\t\t\t| Set animation type to \"slide\", \"fade\" or leave empty \"\"\nopenSpeed\t\t| integer\t| 200\t\t\t\t| Set the speed of the open animation\ncloseSpeed\t\t| integer \t| 200\t\t\t\t| Set the speed of the close animation\nscroll\t\t\t| boolean\t| false\t\t\t\t| Scroll to accordion on open\nscrollSpeed\t\t| integer\t| 400\t\t\t\t| Set the speed of the scroll animation\nscrollOffset\t| integer\t| 0\t\t\t\t\t| Additional offset to accordion position\nopenSingle\t\t| boolean\t| false\t\t\t\t| Open just one accordion at once\nstayOpen\t\t| mixed\t\t| null\t\t\t\t| Leave items open, accepts null, integer (index) or string (selector, \"first\" or \"last\")\nselfBlock\t\t| boolean\t| false\t\t\t\t| Block close event on click\nselfClose\t\t| boolean\t| false\t\t\t\t| Close accordion on click outside\nhash\t\t\t| boolean\t| true\t\t\t\t| Open accordion with id on hash change\nbreakpoints\t\t| array\t\t| null\t\t\t\t| Array of objects, see [example](https://schascha.github.io/BeefUp/#breakpoints)\nonInit\t\t\t| function\t| null\t\t\t\t| Callback: Fires after the accordions initially setup\nonOpen\t\t\t| function\t| null\t\t\t\t| Callback: Fires after the accordions initially setup\nonClose\t\t\t| function\t| null\t\t\t\t| Callback: Fires after the accordions initially setup\nonScroll\t\t| function\t| null\t\t\t\t| Callback: Fires after the accordions initially setup\n\n## Advanced\n\n### API Methods\n\n```javascript\nvar $beefup = $('.beefup').beefup();\n```\n\n#### Open\n\n```javascript\n$beefup.open($('#beefupID'));\n```\n\n#### Close\n\n```javascript\n$beefup.close($('#beefupID'));\n```\n\n#### Click\n\n```javascript\n$beefup.click($('#beefupID'));\n```\n\n#### Scroll\n\n```javascript\n$beefup.scroll($('#beefupID'));\n```\n\n### Callbacks\n\n```javascript\n$('.beefup').beefup({\n    onInit: function ($this) {\n        // Do something after initially setup\n    },\n    onOpen: function ($this) {\n        // Do something after accordion open the content\n    },\n    onClose: function ($this) {\n        // Do something after accordion close the content\n    },\n    onScroll: function ($this) {\n        // Do something after scroll animation\n    }\n});\n```\n\n### HTML5 data attributes\n\n```html\n\u003carticle class=\"beefup\" data-beefup-options='{\"animation\": \"\", \"openSpeed\": 800}'\u003e\n    ...\n\u003c/article\u003e\n```\n\n## Bugs? 🐛\n\nPlease let me know: https://github.com/Schascha/BeefUp/issues\n\n## Buy me a Coffee ☕\n\nSupport this project and [others](https://github.com/Schascha?tab=repositories) via [PayPal](https://www.paypal.me/LosZahlos). Thanks\n\n## Changelog\n\nDetailed changes for each release are documented in the [release notes](https://github.com/Schascha/BeefUp/releases).\n\n## License\n\n[MIT](./LICENSE)\n\nCopyright (c) 2014-present Sascha Künstler\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschascha%2Fbeefup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschascha%2Fbeefup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschascha%2Fbeefup/lists"}