Jquery plug-in allows you to show the effect of a large image by hovering the cursor over the right side of the image (similar to Taobao)

Source: Internet
Author: User

The plug-in name is elevatezoom.

To achieve this effect, you need to prepare two images, one small one and the other large for displaying when the mouse passes. Then, we only need to add the data-zoom-image attribute for the IMG label, and its value is the address of the big image. Finally, select the image in JavaScript and call elevatezoom.

The following is an example (downloaded from GitHubCodeIn this example ):Copy codeThe Code is as follows: <! Doctype HTML>
<HTML>
<Head>
<Meta charset = 'utf-8'/>
<Title> jquery elevatezoom demo </title>
<SCRIPT src = 'jquery-1.8.3.min.js '> </SCRIPT>
<SCRIPT src = 'jquery. elevateZoom-2.3.0.min.js '> </SCRIPT>
</Head>
<Body>
<H1> basic zoom example

<Br/>
See more examples online <a href = "http://www.elevateweb.co.uk/image-zoom/examples"> http://www.elevateweb.co.uk/image-zoom/examples </a>
<SCRIPT>
$ ('# Zoom_01'). elevatezoom ();
</SCRIPT>
</Body>
</Html>

The implementation result is as follows:

I have not studied the specific code, but I know how to use it. I would like to share it here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.