{"id":13554000,"url":"https://github.com/fengyuanchen/jquery-viewer","last_synced_at":"2025-04-04T07:07:23.164Z","repository":{"id":37413143,"uuid":"124660756","full_name":"fengyuanchen/jquery-viewer","owner":"fengyuanchen","description":"A jQuery plugin wrapper for Viewer.js.","archived":false,"fork":false,"pushed_at":"2020-07-21T11:09:18.000Z","size":3270,"stargazers_count":335,"open_issues_count":0,"forks_count":168,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-28T06:08:22.554Z","etag":null,"topics":["image-viewer","jquery","jquery-plugin","viewer","viewerjs"],"latest_commit_sha":null,"homepage":"https://fengyuanchen.github.io/jquery-viewer","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/fengyuanchen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-10T13:58:03.000Z","updated_at":"2025-02-20T10:59:44.000Z","dependencies_parsed_at":"2022-07-08T01:31:01.873Z","dependency_job_id":null,"html_url":"https://github.com/fengyuanchen/jquery-viewer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fengyuanchen%2Fjquery-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fengyuanchen%2Fjquery-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fengyuanchen%2Fjquery-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fengyuanchen%2Fjquery-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fengyuanchen","download_url":"https://codeload.github.com/fengyuanchen/jquery-viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135144,"owners_count":20889421,"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":["image-viewer","jquery","jquery-plugin","viewer","viewerjs"],"created_at":"2024-08-01T12:02:37.757Z","updated_at":"2025-04-04T07:07:23.142Z","avatar_url":"https://github.com/fengyuanchen.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","jquery"],"sub_categories":[],"readme":"# jquery-viewer\n\n[![Build Status](https://img.shields.io/travis/fengyuanchen/jquery-viewer.svg)](https://travis-ci.org/fengyuanchen/jquery-viewer) [![Coverage Status](https://img.shields.io/codecov/c/github/fengyuanchen/jquery-viewer.svg)](https://codecov.io/gh/fengyuanchen/jquery-viewer) [![Downloads](https://img.shields.io/npm/dm/jquery-viewer.svg)](https://www.npmjs.com/package/jquery-viewer) [![Version](https://img.shields.io/npm/v/jquery-viewer.svg)](https://www.npmjs.com/package/jquery-viewer)\n\n\u003e A jQuery plugin wrapper for [Viewer.js](https://github.com/fengyuanchen/viewerjs).\n\n- [Demo](https://fengyuanchen.github.io/jquery-viewer)\n\n## Main\n\n```text\ndist/\n├── jquery-viewer.js        (UMD)\n├── jquery-viewer.min.js    (UMD, compressed)\n├── jquery-viewer.common.js (CommonJS, default)\n└── jquery-viewer.esm.js    (ES Module)\n```\n\n## Getting started\n\n### Installation\n\n```shell\nnpm install jquery-viewer jquery viewerjs\n```\n\nInclude files:\n\n```html\n\u003cscript src=\"/path/to/jquery.js\"\u003e\u003c/script\u003e\u003c!-- jQuery is required --\u003e\n\u003cscript src=\"/path/to/viewer.js\"\u003e\u003c/script\u003e\u003c!-- Viewer.js is required --\u003e\n\u003clink  href=\"/path/to/viewer.css\" rel=\"stylesheet\"\u003e\n\u003cscript src=\"/path/to/jquery-viewer.js\"\u003e\u003c/script\u003e\n```\n\n### Usage\n\nInitialize with `$.fn.viewer` method.\n\n```html\n\u003c!-- a block container is required --\u003e\n\u003cdiv\u003e\n  \u003cimg id=\"image\" src=\"picture.jpg\" alt=\"Picture\"\u003e\n\u003c/div\u003e\n\n\u003cdiv\u003e\n  \u003cul id=\"images\"\u003e\n    \u003cli\u003e\u003cimg src=\"picture-1.jpg\" alt=\"Picture 1\"\u003e\u003c/li\u003e\n    \u003cli\u003e\u003cimg src=\"picture-2.jpg\" alt=\"Picture 2\"\u003e\u003c/li\u003e\n    \u003cli\u003e\u003cimg src=\"picture-3.jpg\" alt=\"Picture 3\"\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/div\u003e\n```\n\n```js\nvar $image = $('#image');\n\n$image.viewer({\n  inline: true,\n  viewed: function() {\n    $image.viewer('zoomTo', 1);\n  }\n});\n\n// Get the Viewer.js instance after initialized\nvar viewer = $image.data('viewer');\n\n// View a list of images\n$('#images').viewer();\n```\n\n## Options\n\nSee the available [options](https://github.com/fengyuanchen/viewerjs#options) of Viewer.js.\n\n```js\n$().viewer(options);\n```\n\n## Methods\n\nSee the available [methods](https://github.com/fengyuanchen/viewerjs#methods) of Viewer.js.\n\n```js\n$().viewer('method', argument1, , argument2, ..., argumentN);\n```\n\n## Events\n\nSee the available [events](https://github.com/fengyuanchen/viewerjs#events) of Viewer.js.\n\n```js\n$().on('event', handler);\n```\n\n## No conflict\n\nIf you have to use other plugin with the same namespace, just call the `$.fn.viewer.noConflict` method to revert to it.\n\n```html\n\u003cscript src=\"other-plugin.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"jquery-viewer.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  $.fn.viewer.noConflict();\n  // Code that uses other plugin's \"$().viewer\" can follow here.\n\u003c/script\u003e\n```\n\n## Browser support\n\nIt is the same as the [browser support of Viewer.js](https://github.com/fengyuanchen/viewerjs#browser-support). As a jQuery plugin, you also need to see the [jQuery Browser Support](https://jquery.com/browser-support/).\n\n## Versioning\n\nMaintained under the [Semantic Versioning guidelines](https://semver.org/).\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT) © [Chen Fengyuan](https://chenfengyuan.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffengyuanchen%2Fjquery-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffengyuanchen%2Fjquery-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffengyuanchen%2Fjquery-viewer/lists"}