{"id":19150000,"url":"https://github.com/smashingboxes/splitdropbutton","last_synced_at":"2025-02-22T20:43:29.679Z","repository":{"id":8733118,"uuid":"10407626","full_name":"smashingboxes/splitdropbutton","owner":"smashingboxes","description":"A simple, easily stylable, split button dropdown jQuery plugin","archived":false,"fork":false,"pushed_at":"2013-06-06T20:16:53.000Z","size":156,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-01-03T18:12:26.277Z","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/smashingboxes.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":"2013-05-31T15:29:11.000Z","updated_at":"2015-07-20T20:47:57.000Z","dependencies_parsed_at":"2022-09-17T16:50:41.837Z","dependency_job_id":null,"html_url":"https://github.com/smashingboxes/splitdropbutton","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/smashingboxes%2Fsplitdropbutton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2Fsplitdropbutton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2Fsplitdropbutton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2Fsplitdropbutton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smashingboxes","download_url":"https://codeload.github.com/smashingboxes/splitdropbutton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240236196,"owners_count":19769570,"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-11-09T08:10:21.385Z","updated_at":"2025-02-22T20:43:29.623Z","avatar_url":"https://github.com/smashingboxes.png","language":"JavaScript","readme":"# SplitDropButton\n\nSplitDropButton is a simple, easily stylable, split button dropdown jQuery plugin similar to those you can find on:\n\n+ [twitter boostrap](http://twitter.github.io/bootstrap/components.html#buttonDropdowns)\n+ [zurb foundation](http://foundation.zurb.com/docs/components/split-buttons.html)\n\nWhy another one then? Both the boostrap and foundation versions weren't easily stylable, there wasn't a good standalone verison, and I didn't want to include big chuncks of either framework just for that one simple widget.\n\n## Demo\n\nSee it in action [here](http://smashingboxes.github.io/splitdropbutton).\n\n## Usage\n\n#### HTML\n\n    \u003cdiv class=\"split-btn\"\u003e\n      \u003ca href=\"#\"\u003ePrimary Link\u003c/a\u003e\n      \u003ca href=\"#\"\u003eSecondary Link\u003c/a\u003e\n      \u003ca href=\"#\"\u003eSecondary Link\u003c/a\u003e\n      \u003ca href=\"#\"\u003eSecondary Link\u003c/a\u003e\n    \u003c/div\u003e\n\n#### Javascript\n\n    $(document).ready(function(){\n      $('.split-btn').splitdropbutton({\n        toggleDivContent: '\u003ci class=\"icon-reorder\"\u003e\u003c/i\u003e' // optional html content for the clickable toggle div\n      })\n    });\n\nCaveat: Since this plugin calculates element widths on page load, if you are using font-face (for example, [font-awesome](http://fortawesome.github.io/Font-Awesome/)) or images within your links, you should use `$(window).load()` instead of `$(document).ready()` See this [stackoverflow answer](http://stackoverflow.com/a/3698214/781704) for why.\n\n#### Generated HTML\n\n    \u003cdiv class=\"split-btn\"\u003e\n      \u003cdiv class=\"spb-toggle\"\u003e\n        \u003ci class=\"icon-reorder\"\u003e\u003c/i\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"spb-primary\"\u003e\n        \u003ca href=\"#\"\u003ePrimary Link\u003c/a\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"spb-secondary\"\u003e\n        \u003ca href=\"#\"\u003eSecondary Link\u003c/a\u003e\n        \u003ca href=\"#\"\u003eSecondary Link\u003c/a\u003e\n        \u003ca href=\"#\"\u003eSecondary Link\u003c/a\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n\n(inline styles were not inlcuded for the sake of this illustration)\n\n#### Stylesheet\n\n    .split-btn .spb-toggle {\n      font-size: 24px;\n      padding: 7px 9px;\n      background: #ccc;\n      color: black;\n    }\n\n    // it's important to style the links with .split-btn a instead of '.spb-primary a' or\n    // '.spb-secondary a' because those divs have widths based on the length of '.split-btn a'\n\n    .split-btn a {\n      padding:  10px;\n      background: black;\n      color: white;\n    }\n    \n    .split-btn a:hover {\n      background: white;\n      color: black;\n    }\n\n## License\n\nThis software is released under the MIT license\nhttp://opensource.org/licenses/MIT","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmashingboxes%2Fsplitdropbutton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmashingboxes%2Fsplitdropbutton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmashingboxes%2Fsplitdropbutton/lists"}