{"id":13760430,"url":"https://github.com/StephanWagner/jBox","last_synced_at":"2025-05-10T10:32:47.055Z","repository":{"id":16194141,"uuid":"18940819","full_name":"StephanWagner/jBox","owner":"StephanWagner","description":"jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.","archived":false,"fork":false,"pushed_at":"2024-06-18T08:02:11.000Z","size":2289,"stargazers_count":1402,"open_issues_count":20,"forks_count":274,"subscribers_count":92,"default_branch":"master","last_synced_at":"2024-10-29T15:34:39.370Z","etag":null,"topics":["alert","confirm","confirmation-dialog","confirmation-modal","customizable-tooltips","dialog","image-gallery","javascript","jbox","jquery-plugin","lightbox","modal","modal-dialog","modal-window","modal-windows","notice","popup","popup-message","popup-window","tooltip"],"latest_commit_sha":null,"homepage":"https://stephanwagner.me/jBox","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/StephanWagner.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-04-19T12:37:51.000Z","updated_at":"2024-10-21T11:41:32.000Z","dependencies_parsed_at":"2023-02-12T18:30:38.620Z","dependency_job_id":"4e6e55dc-af01-46af-b05a-793dadb789c5","html_url":"https://github.com/StephanWagner/jBox","commit_stats":{"total_commits":378,"total_committers":11,"mean_commits":34.36363636363637,"dds":"0.13756613756613756","last_synced_commit":"6ebe5009f07cddbab0b3541fc1b037e6578c42fe"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanWagner%2FjBox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanWagner%2FjBox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanWagner%2FjBox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanWagner%2FjBox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StephanWagner","download_url":"https://codeload.github.com/StephanWagner/jBox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224144193,"owners_count":17263223,"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":["alert","confirm","confirmation-dialog","confirmation-modal","customizable-tooltips","dialog","image-gallery","javascript","jbox","jquery-plugin","lightbox","modal","modal-dialog","modal-window","modal-windows","notice","popup","popup-message","popup-window","tooltip"],"created_at":"2024-08-03T13:01:10.111Z","updated_at":"2024-11-16T17:31:07.824Z","avatar_url":"https://github.com/StephanWagner.png","language":"JavaScript","readme":"# jBox\n\njBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.\n\nDemo: https://stephanwagner.me/jBox\n\nDocs: https://stephanwagner.me/jBox/documentation\n\n---\n\n## Install\n\n### ES6\n\n```bash\nnpm install --save jbox\n```\n\n```javascript\nimport jBox from 'jbox';\nimport 'jbox/dist/jBox.all.css';\n```\n\n### CDN\n\n```html\n\u003cscript src=\"https://code.jquery.com/jquery-3.6.0.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/StephanWagner/jBox@v1.3.2/dist/jBox.all.min.js\"\u003e\u003c/script\u003e\n\u003clink href=\"https://cdn.jsdelivr.net/gh/StephanWagner/jBox@v1.3.2/dist/jBox.all.min.css\" rel=\"stylesheet\"\u003e\n```\n\n---\n\n## Tooltips\n\nCreate a new instance of jBox Tooltip and attach it to elements:\n\n```javascript\nnew jBox('Tooltip', {\n  attach: '.tooltip'\n});\n```\n\nNow elements with `class=\"tooltip\"` will open tooltips:\n\n```html\n\u003cspan class=\"tooltip\" title=\"My first tooltip\"\u003eHover me!\u003c/span\u003e\n\u003cspan class=\"tooltip\" title=\"My second tooltip\"\u003eHover me!\u003c/span\u003e\n```\n\n---\n\n## Modal windows\n\nYou can set up modal windows the same way as tooltips.\nBut most of times you'd want more variety, like a title or HTML content:\n\n```javascript\nnew jBox('Modal', {\n  width: 300,\n  height: 200,\n  attach: '#myModal',\n  title: 'My Modal Window',\n  content: '\u003ci\u003eHello there!\u003c/i\u003e'\n});\n```\n\n```html\n\u003cdiv id=\"myModal\"\u003eClick me to open a modal window!\u003c/div\u003e\n```\n\n---\n\n## Confirm windows\n\nConfirm windows are modal windows which requires the user to confirm a click action on an element.\nGive an element the attribute data-confirm to attach it:\n\n```javascript\nnew jBox('Confirm', {\n  confirmButton: 'Do it!',\n  cancelButton: 'Nope'\n});\n```\n\n```html\n\u003cdiv onclick=\"alert('Yay! You did it!')\" data-confirm=\"Do you really want to do this?\"\u003eClick me!\u003c/div\u003e\n\u003ca href=\"https://stephanwagner.me/jBox\" data-confirm=\"Do you really want to leave this page?\"\u003eClick me!\u003c/a\u003e\n```\n\n---\n\n## Notices\n\nA notice will open automatically and destroy itself after some time:\n\n```javascript\nnew jBox('Notice', {\n content: 'Hurray! A notice!'\n});\n```\n\n---\n\n## Images\n\nTo create image windows you only need following few lines:\n\n```javascript\nnew jBox('Image');\n```\n\n```html\n\u003ca href=\"/image-large.jpg\" data-jbox-image=\"gallery1\" title=\"My image\"\u003e\n  \u003cimg src=\"/image.jpg\" alt=\"\"\u003e\n\u003c/a\u003e\n```\n\n---\n\n## Learn more\n\nThese few examples are very basic.\nThe jBox library is quite powerful and offers a vast variety of options to customize appearance and behavior.\nLearn more in the documentation: https://stephanwagner.me/jBox/documentation\n","funding_links":[],"categories":["Modals and Popups","Modals and Popups [🔝](#readme)","Animation","模态框和弹出框"],"sub_categories":["Other","Modals and Popups","其它"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStephanWagner%2FjBox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStephanWagner%2FjBox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStephanWagner%2FjBox/lists"}