{"id":24507454,"url":"https://github.com/subzane/anymodal","last_synced_at":"2025-03-15T09:15:17.632Z","repository":{"id":57180982,"uuid":"49881245","full_name":"SubZane/anyModal","owner":"SubZane","description":"anyModal is a responsive solution for modal windows written in javascript. This new version is written in vanilla JavaScript and has no other dependencies.","archived":false,"fork":false,"pushed_at":"2022-12-01T10:15:19.000Z","size":599,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-07T22:02:05.357Z","etag":null,"topics":["css-animations","javascript","modal-windows"],"latest_commit_sha":null,"homepage":"https://subzane.github.io/anyModal/","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/SubZane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-18T14:17:05.000Z","updated_at":"2023-05-15T11:19:07.000Z","dependencies_parsed_at":"2022-09-14T03:40:41.418Z","dependency_job_id":null,"html_url":"https://github.com/SubZane/anyModal","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/SubZane%2FanyModal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubZane%2FanyModal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubZane%2FanyModal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SubZane%2FanyModal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SubZane","download_url":"https://codeload.github.com/SubZane/anyModal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707383,"owners_count":20334619,"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":["css-animations","javascript","modal-windows"],"created_at":"2025-01-21T23:50:45.474Z","updated_at":"2025-03-15T09:15:17.613Z","avatar_url":"https://github.com/SubZane.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anyModal v1.3\n\nanyModal is a responsive solution for modal windows written in javascript. This new version is written in vanilla JavaScript and has no other dependencies.\n\n## Demo\n\nhttp://subzane.github.io/anyModal/\n\n## Features\n\n- Responsive modal windows. Works great on desktop computers as well on smart phones.\n- Can be used for video, images and text\n- Unlimited content possible inside modal window. Uses friendly simple scrollbars.\n\n## Installation\n\n```\nyarn add anyModal\n```\n\n### Setup\n\n```html\n\u003c!-- You'll need to include anyModal of course! --\u003e\n\u003cscript src=\"anyModal.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Some basic CSS is required of course --\u003e\n\u003clink rel=\"stylesheet\" href=\"css/anyModal.css\" /\u003e\n```\n\n## Usage\n\n```javascript\ndocument.addEventListener('DOMContentLoaded', function (event) {\n\tanyModal.init({\n\t\ttransitiontime: 300,\n\t\tredrawOnResize: true,\n\t\tbackgroundscroll: true,\n\t});\n});\n```\n\n### Settings and Defaults\n\n```javascript\noptions: {\n\t\ttransitiontime: 300,\n\t\tredrawOnResize: true,\n\t\tbackgroundscroll: true,\n};\n```\n\n- `transitiontime`: Time in milliseconds to time transtions set in your CSS. Change this if you change your CSS\n- `redrawOnResize`: Force a redraw if the viewport changes.\n- `backgroundscroll`: Allow background behind modal to scroll.\n\n### Typical setup\n\nThis could be your typical script setup.\n\nAdd the following javscript to execute the script on load.\n\n```javascript\ndocument.addEventListener('DOMContentLoaded', function (event) {\n\tanyModal.init();\n});\n```\n\nThe following markup to launch the modal window. Use the `data-effect` attribute to change effects.\n\n```html\n\u003ca href=\"#\" data-modal=\"mymodal\" data-effect=\"rm-effect-1\"\u003eFade and zoom\u003c/a\u003e\n```\n\n### Effects available\n\n- `rm-effect-1`: Fade and zoom\n- `rm-effect-2`: Slide from right\n- `rm-effect-3`: Pop from bottom\n- `rm-effect-4`: Newspaper\n- `rm-effect-5`: Fall\n- `rm-effect-6`: Side fall\n- `rm-effect-7`: Sticky up\n- `rm-effect-8`: Side flip\n- `rm-effect-9`: Top flip\n- `rm-effect-10`: 3D sign\n- `rm-effect-11`: Scale\n- `rm-effect-12`: 3D slit\n- `rm-effect-13`: 3D rotate bottom\n- `rm-effect-14`: 3D rotate in left\n\nAdd the following markup for the modal window itself. The ID of the modal window must match the `data-modal` attribute of the button\n\n```html\n\u003cdiv class=\"rm-modal\" id=\"mymodal\"\u003e\n\t\u003cdiv class=\"rm-content\"\u003e\n\t\t\u003cdiv class=\"rm-header\"\u003e\n\t\t\t\u003ch3\u003eModal Dialog\u003c/h3\u003e\n\t\t\t\u003ca href=\"#\" class=\"rm-cross\"\u003e\n\t\t\t\t\u003cimg src=\"img/cross.svg\" width=\"19\" height=\"19\" alt=\"\" /\u003e\n\t\t\t\u003c/a\u003e\n\t\t\u003c/div\u003e\n\t\t\u003cdiv class=\"rm-inner\"\u003e\n\t\t\t\u003cp\u003eSed posuere consectetur est at lobortis.\u003c/p\u003e\n\t\t\u003c/div\u003e\n\t\u003c/div\u003e\n\u003c/div\u003e\n```\n\n### External modal setup\n\nThe following markup to launch the modal window. Use the `data-url` attribute to use external modal content.\n\n```html\n\u003ca class=\"btn btn-effect\" href=\"#\" data-modal=\"myexternalmodal\" data-effect=\"am-effect-1\" data-title=\"External modal loaded\" data-url=\"externalmodal.html\"\n\t\u003eFade and zoom\u003c/a\n\u003e\n```\n\n## Attributes explained\n\n- `data-modal`: ID of of modal element\n- `data-effect`: Effect\n- `data-title`: Title of modal when using external content\n- `data-url`: URL to external modal content\n\n## changelog\n\n### 1.3\n\n- Updated documentation and github workflow and new demo url\n\n### 1.2.1\n\n- Fixed issue when the backgrund is scrollable even when the modal is open.\n- Updated to work with Gulp rather than Grunt\n\n### 1.2.0\n\n- Now available on Yarn instead of Bower\n\n#### 1.1.0\n\n- Modal windows can now display content from other URLs\n- More hooks added\n\n#### 1.0.1\n\n- Fixed bug where an iframed video was displayed on Safari iPhone even if the modal was hidden.\n\n#### 1.0.0\n\n- Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubzane%2Fanymodal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubzane%2Fanymodal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubzane%2Fanymodal/lists"}