A pure JavaScript image zooming plugin; as seen on Medium.com.
Has no dependencies on jQuery or Bootstrap.
This is a port of the original version by @fat: https://github.com/fat/zoom.js
https://nishanths.github.io/zoom.js
- Link the zoom.js and zoom.css files to your site or application.
<link href="css/zoom.css" rel="stylesheet">
<script src="dist/zoom.js"></script>
- Add a
data-action="zoom"
attribute to the images you want to make zoomable. For example:
<img src="img/blog_post_featured.png" data-action="zoom">
The API is the same as in the original implementation. But browser compatibility may be lower since this does not use vendor prefixes.
Uses the transitionend event without vendor prefixes, so IE 10 or higher.
If you need improved compatibility, please create an issue.
The MIT License. © 2016 Nishanth Shanmugham.