How to Zoom Image On Mouseover Using jQuery

Zoom Image On Mouseover Using jQuery
Zooming image on mouseover feature make your website more fancy. You can implement this functionality via many ways like CSS, jQuery or JavaScript. In this article we are going to cover this topic.

You have seen this image zoom feature on many web application, like eCommerce or portfolio websites. This feature will give more closer view to users for your products and off-course make more interactive.

We are using ElevateZoom plugin to implement zoom image on mouseover using jQuery. This is wonderful plugin which comes with different type of zooming effect. Lets start how we can use this plugin:

jQuery Image Zoom on Mouse Hover

We have used ElevateZoom default options to create image zoom effect. Just called the inbuilt library function with the reference of image Id.

First download the elevatezoom plugin and include JavaScript files. We have loaded both below files and use elevateZoom() function to call default zoom settings.

On mouse hover this elevatezoom() script method is called.

Now adding an image element with the small and large image. Prefer to use large image for better zoom effect.

Than adding the jQuery code to show image zoom effect on mouseover. This script will show you inner zoom effect on mouse hover.

As we told you using this plugin you can create different type of image zooming effect like Lens image zoom, Easing Zoom, Square Zoom, Tint zoom effect.

image zoom effect

This plugin has many config option, you can change the settings to get require image zoom option. Lets see what we can do with these:

Tint Image Zoom Effect:

For getting this zooming effect we can set config attribute value in script method. like that:

Lens Effect Image Zooming:

To get lens effect while zooming image, put below attribute value in script code.

Easing Zoom effect:

For easing zoom effect use ‘easing‘ attribute with Possible Values: “True”, “False”. You can change the easing duration by using this attribute ‘easingDuration‘, be default its value set to 2000. See the example below:

Conclusion:

Implementing this plugin on your web application is quite easy process. The great part is that you can config the own zoom effect settings by using some attribute value. So just follow the above mentioned steps and your are good to go.

You May Also Like:

Simple jQuery Barcode Generator Example
Credit Card Number Validation Using jQuery
jQuery Interactive Parallax Effect for Background Layers
Using jQuery Email Autocomplete in HTML Form

Download Script

Recommended Posts For You

About Harish

I am professional web developer and blogger. Use this blog to share own api and other web development experience with you. I do accept paid work. Write to me at - [email protected]

View all posts by Harish

Leave a Comment

Your email address will not be published. Required fields are marked *