Minimalist Image Zoom Plugin For jQuery - ViewImage.js

File Size: | 5.28 KB |
---|---|
Views Total: | 4823 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
ViewImage.js is a super tiny (less than 1kb gzipped) and fully responsive jQuery image zoom plugin which provide a zooming functionality on any images & image links within the document.
How to use it:
1. Include both jQuery library and the jQuery ViewImage.js script on the webpage.
<script src="//code.jquery.com/jquery.slim.min.js"></script> <script src="view-image.js"></script>
2. Add images, image links or even text links to the webpage as these:
<h2>Img</h2> <img src="1.jpg"> <h2>Text Link</h2> <a href="1.jpg">Click Me</a> <h2>Image Link</h2> <a href="1.jpg"> <img src="thumb-1.jpg"> </a>
3. Call the function on the images and links. Done.
jQuery.viewImage({ 'target': 'img, a' });
4. Set the plugin to exclude images as this:
jQuery.viewImage({ 'exclude': '.exclude', });
5. Set the transition delay in milliseconds:
jQuery.viewImage({ 'delay': 300 });
Changelog:
2020-08-05
- Update view-image.js
This awesome jQuery plugin is developed by Tokinx. For more Advanced Usages, please check the demo page or visit the official website.