Home > Web Front-end > JS Tutorial > The jquery plug-in realizes the effect of displaying a large image when the mouse passes over the right side of the image (similar to Taobao)_jquery

The jquery plug-in realizes the effect of displaying a large image when the mouse passes over the right side of the image (similar to Taobao)_jquery

WBOY
Release: 2016-05-16 17:42:24
Original
1021 people have browsed it

The name of this plug-in is elevatedzoom. The website address is http://www.elevateweb.co.uk/image-zoom. The project homepage on github is https://github.com/elevateweb/elevatezoom. It is recommended to download it from github. This website The speed is relatively fast.

To achieve this effect, you need to prepare two pictures, one small and one large for display when the mouse passes over it. Then we only need to add the data-zoom-image attribute to the img tag, whose value is the address of the large image, and finally select the image in javascript and call elevateZoom().

An example is given below (this example is included in the code downloaded from github):

Copy code Code As follows:





jQuery elevateZoom Demo




Basic Zoom Example






see more examples online http://www.elevateweb.co.uk/image-zoom/examples
<script> <br>$('#zoom_01').elevateZoom(); <br></script>



The effect achieved is as follows:
The jquery plug-in realizes the effect of displaying a large image when the mouse passes over the right side of the image (similar to Taobao)_jquery
I have not studied the specific code, I just know how to use it, so I would like to share it here.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template