image-zoom
Zoom an image to full-screen, as seen on Medium.com. It uses transforms for buttery smoothness, but should still work on older browsers given polyfills for classList & bind. Demo here
Installation
Install using Duo or NPM for use with browserify.
$ npm install image-zoom
var Zoom = require('bmcmahen/image-zoom');
or use the standalone build in dist
using the global Imagezoom
.
API
You can use markup (much like Bootstrap) for initiating zoom on certain elements.
Or you can use the javascript API, like in the example below.
.show()
Zoom in.
.hide()
Zoom out.
.overlay()
Enable the overlay when zooming into the image.
.padding(num)
Set the padding of the zoomed image.
.use(plugin)
Use a plugin.
Events
showing
shown
hiding
hidden
cancel
var zoom = ;var z = ;z;
License
MIT