Minimalist Image Zoom Plugin For jQuery - ViewImage.js

Minimalist Image Zoom Plugin For jQuery - ViewImage.js
File Size: 5.09 KB
Views Total:
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-3.1.1.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
});

This awesome jQuery plugin is developed by Tokinx. For more Advanced Usages, please check the demo page or visit the official website.