jackmoore / wheelzoom

A small script for zooming IMG elements with the mousewheel/trackpad.
http://www.jacklmoore.com/wheelzoom
MIT License
342 stars 95 forks source link

Wheelzoom

A small script for zooming IMG elements with the mousewheel/trackpad. Wheelzoom works by replacing the img element's src with a transparent image, then using the original src as a background image, which can be sized and positioned. Wheelzoom is dependency free, doesn't add any extra elements to the DOM, or change the positioning of the IMG element.

Usage:

wheelzoom(document.querySelectorAll('img'));
// or
wheelzoom(document.querySelectorAll('img'), {zoom:0.05});
// zoom sets the zoom percent.

License

MIT License

Supported Browsers:

Chrome, Safari, Opera, FireFox 17+, IE9+.

Changelog:

v.4.0.1 - 2019/08/13
v.4.0.0 - 2018/10/09
v.3.1.3 - 2018/01/31
v.3.1.2 - 2017/04/20
v.3.1.0 - 2017/04/10
v.3.0.4 - 2015/12/15
v.3.0.3 - 2015/09/05
v.3.0.2 - 2015/09/05
v.3.0.1 - 2015/09/05
v.3.0.0 - 2014/10/14
v.2.0.1 - 2014/9/9
v.2.0.0 - 2014/4/17
v.1.1.3 - 2014/4/13
v.1.1.2 - 2013/1/31
v1.1.1 - 2013/1/29
v1.1.0 - 2012/11/28
v1.0 - 2012/11/26