If you’ve ever browsed an e-commerce site you’ve expected seen a image zooming effect. You float a product print and that partial of a picture magnifies for a clearer view.
The ZooMove plugin is a good approach to replicate this effect on your site. It’s powered by jQuery, so we can get this adult using fast but most code.
To set adult a ZooMove image, you’ll need three specific files in your page header:
- ZooMove CSS
- ZooMove JS
Both ZooMove files can be minified if we wish faster page loads. You could also mix a CSS record into your categorical stylesheet if that’s easier.
All a genuine sorcery happens in a HTML where we can set HTML5
data-* attributes for a opposite effects.
This lets we qualification your own tradition zooming effect formed on 4 opposite parameters:
data-zoo-scale– defines a total wizz distance when hovering (e.g. 2.0 for 200%)
data-zoo-move– defines either a picture moves along with a cursor
data-zoo-over– defines a zoomed picture appear over a original
data-zoo-cursor– defines a cursor point
A final fifth parameter lets we conclude what a new picture URL should be (if needed).
You can use ZooMove in all vital browsers, including IE9+. This plugin is widely supported and it offers one heck of a user experience.
If you’re looking for a simple hover-to-zoom library ZooMove is an glorious choice. It’s lightweight enough to run on any website and it’s powered by jQuery, so we won’t need to write as most formula to get it working.