JavaScript Zoom in and Zoom out

Advertisement

This page discusses - JavaScript Zoom in and Zoom out

JavaScript Zoom in and Zoom out

This section illustrates you how to zoom in and zoom out of an image using
JavaScript.

Here we are providing you an example to show the image effect. For this
purpose, we have created three functions. The function zoomImage() and zoom()
sets the height and width of the image and make it to show the effect Zoom In and Zoom Out. The function stopZoom()
provides the functionality to stop the image effect by using the method
clearInterval(). Here we have used Mouseover and Mouseout events to make the
image zoom in and zoom out. As long as you put the cursor on the link Zoom In,
the size of image will start increasing and if you put the cursor on link Zoom
Out., the size of image will start decreasing.