A small jQuery plugin for zooming images on mouseover or mousedown. See the project page for documentation and a demonstration. Released under the MIT license.
- Will use data-src attribute if present before checking for the presence of an src attribute.
- Restricted grab to just the left-mouse-button on mousedown
- Fixed misnamed onZoomOut callback
- Fixed a bug with absolutely or fixed position target elements
- Set the value of
this
to be zoom-image element for the onZoomIn and onZoomOut callbacks
- Namespaced events to assist unbinding events.
- Added destroy event to unbind zoom events & remove created img element. Example: $('.example').trigger('zoom.destroy');
- Added onZoomIn and onZoomOut callbacks
- Fixing mistake made in previous commit
- Replaced new Image() with document.createElement('img') to avoid a potential bug in Chrome 27.
- Replaced jQuery shorthand methods with on() in anticipation of jQuery 2.0
- Added 'toggle' behavior to zoom in/out on click. Example: $('#example').zoom({ on:'toggle' });
- Removed the icon property in favor of just using CSS.
- Created $.zoom which contains the positioning logic, so that users can write custom controls or event handling.
- Added 'target' property for specifying the element that displays the zoomed image.
- Changed API & added option to activate on click.
- Added 'callback' property that will execute a callback function once the image has loaded.
- Fixed a bug relating to the 'grab' property
- Fixed a positioning bug
- Added 'grab' property
- First release