"jquery" picture before and after the contrast effect--beforeafter

Source: Internet
Author: User

Today, share a jquery plugin-the picture before and after (Beforeafter), the effect is as follows:

How to use:

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "Utf-8"/>    <title>Picture before and after comparison</title></Head><Body>    <Divclass= "Beforeafter">        <imgsrc= "Images/before.jpg"alt= "Before"Height= "420"width= "748"/>        <imgsrc= "Images/after.jpg"alt= "after"Height= "420"width= "748"/>    </Div></Body></HTML><Scripttype= "Text/javascript"src= "Js/jquery.min.js"></Script><Scripttype= "Text/javascript"src= "Js/jquery-ui-1.8.13.custom.min.js"></Script><Scripttype= "Text/javascript"src= "Js/jquery.beforeafter-1.4.js"></Script><Scripttype= "Text/javascript">$(function(){    $('. Beforeafter'). Beforeafter ({imagePath:'images/'    });});</Script>

Parameter description (partial):

Showfulllinks: Whether to display the following link, click on the link, will automatically display the full front or back of the picture, the default value: True

ImagePath: The path to the navigation picture (absolute path or relative path), the navigation picture refers to the middle green bar and the left and right triangle, the default value:/js/beforeafter/

Beforelinktext: Set the text below the link below the picture, the default value: Show only before

Afterlinktext: After setting the text of the link below the picture, the default value: Show only after

Attention:

Before and after two pictures must be the same size.

Demo: click here to download

Website address:http://www.catchmyfame.com/catchmyfame-jquery-plugins/jquery-beforeafter-plugin/

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.