You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<scriptsrc="/path/to/jquery.js"></script><!-- jQuery is required --><scriptsrc="/path/to/viewer.js"></script><!-- Viewer.js is required --><linkhref="/path/to/viewer.css" rel="stylesheet"><scriptsrc="/path/to/jquery-viewer.js"></script>
Usage
Initialize with $.fn.viewer method.
<!-- a block container is required --><div><imgid="image" src="picture.jpg" alt="Picture"></div><div><ulid="images"><li><imgsrc="picture-1.jpg" alt="Picture 1"></li><li><imgsrc="picture-2.jpg" alt="Picture 2"></li><li><imgsrc="picture-3.jpg" alt="Picture 3"></li></ul></div>
var$image=$('#image');$image.viewer({inline: true,viewed: function(){$image.viewer('zoomTo',1);}});// Get the Viewer.js instance after initializedvarviewer=$image.data('viewer');// View a list of images$('#images').viewer();
If you have to use other plugin with the same namespace, just call the $.fn.viewer.noConflict method to revert to it.
<scriptsrc="other-plugin.js"></script><scriptsrc="jquery-viewer.js"></script><script>$.fn.viewer.noConflict();// Code that uses other plugin's "$().viewer" can follow here.</script>