# jquery-viewer **Repository Path**: MuXueRuanJian/jquery-viewer ## Basic Information - **Project Name**: jquery-viewer - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # jquery-viewer [![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) > A jQuery plugin wrapper for [Viewer.js](https://github.com/fengyuanchen/viewerjs). - [Demo](https://fengyuanchen.github.io/jquery-viewer) ## Main ```text dist/ ├── jquery-viewer.js (UMD) ├── jquery-viewer.min.js (UMD, compressed) ├── jquery-viewer.common.js (CommonJS, default) └── jquery-viewer.esm.js (ES Module) ``` ## Getting started ### Installation ```shell npm install jquery-viewer jquery viewerjs ``` Include files: ```html ``` ### Usage Initialize with `$.fn.viewer` method. ```html
Picture
``` ```js var $image = $('#image'); $image.viewer({ inline: true, viewed: function() { $image.viewer('zoomTo', 1); } }); // Get the Viewer.js instance after initialized var viewer = $image.data('viewer'); // View a list of images $('#images').viewer(); ``` ## Options See the available [options](https://github.com/fengyuanchen/viewerjs#options) of Viewer.js. ```js $().viewer(options); ``` ## Methods See the available [methods](https://github.com/fengyuanchen/viewerjs#methods) of Viewer.js. ```js $().viewer('method', argument1, , argument2, ..., argumentN); ``` ## Events See the available [events](https://github.com/fengyuanchen/viewerjs#events) of Viewer.js. ```js $().on('event', handler); ``` ## No conflict If you have to use other plugin with the same namespace, just call the `$.fn.viewer.noConflict` method to revert to it. ```html ``` ## Browser support It 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/). ## Versioning Maintained under the [Semantic Versioning guidelines](https://semver.org/). ## License [MIT](https://opensource.org/licenses/MIT) © [Chen Fengyuan](https://chenfengyuan.com/)