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 (this example is available in the code downloaded from github ):
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.

Related Article

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.