HTML 5 plug-in tutorial-Add a product window with a browser magnifier

Source: Internet
Author: User

HTML 5 plug-in tutorial-Add a product window with a browser magnifier

The KeyMob Mobile Ad platform provides an all-in-one mobile marketing solution for application developers and advertisers, such as application cross-promotion and mobile advertising optimization, to maximize the value of application developers and advertisers.
I. Usage

The Code is as follows:
<Link rel = "stylesheet" href = "css/smoothproducts.css">
<Script type = "text/javascript" src = "js/jquery. min. js"> </script>
<Script type = "text/javascript" src = "js/smoothproducts. min. js"> </script>

Ii. Html Structure

The Code is as follows:
<Div class = "sp-wrap">
<A href = "images/1.jpg"> </a>
<A href = "images/2.jpg"> </a>
</Div>

You can also use the sp-loading class to add a loading indicator container for image loading. This container disappears after the image is loaded.

The Code is as follows:
<Div class = "sp-loading">
Loading images </div>
<Div class = "sp-wrap">
<A href = "images/1.jpg"> </a>
<A href = "images/2.jpg"> </a>
</Div>

If you need to display the specified product thumbnail when loading the page, instead of the first thumbnail, you can specify the sp-default class on the hyperlink of the image you want to specify.

The Code is as follows:
<Div class = "sp-wrap">
<A href = "images/1.jpg"> </a>
<A href = "images/2.jpg" class =" sp-default "> </a>
</Div>

Iii. initialize the plug-in

The Code is as follows:
<Script type = "text/javascript">
$ (Window). load (function (){
$ ('. Sp-wrap'). smoothproducts ();
});
</Script>

The KeyMob Mobile Ad platform provides an all-in-one mobile marketing solution for application developers and advertisers, such as application cross-promotion and mobile advertising optimization, to maximize the value of application developers and advertisers.

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.