jQuery特效插件,展示拉伸和放大功能

jQuery特效插件,展示拉伸和放大功能
点击图片,图片被拉伸放大,效果非常好!

使用方法uff1a

1、头部区域的参考文件jquery.js,photorevealer.js,datouwang.css

2。将区域代码添加到文件中

3,图片的数目可以自由添加或减少、添加或删除。

4。如果图片的信息越多,就需要更多的空间,并在photorevealer.js第三十六线数可以改变。

核心代码:

$(文档)Ready(函数(){)

$('。photo_slider)。每个(函数(){)

var =美元美元(这)AddClass('photo-area);
VaR('img this.find img =美元美元);
电邮信息= this.find美元('。info_area);

VaR选择= { };

img.load美元(函数(){()
opts.imgw = $()img.width;
Opts.imgh = $img.height ();
});

opts.orgw = $()this.width;
opts.orgh = $()this.height;

img.css美元({
marginleft:150px
margintop:150px
});

VaR包=美元美元(' ')。追加($ IMG)。PrependTo(美元);

VaR(还要开=美元美元的信息)。AppendTo(美元);

VAR密切=美元(美元'关闭'),AppendTo(元信息);

opts.wrapw = $()wrap.width;
opts.wraph = $()wrap.height;

open.click美元(函数(){()
this.animate美元({
宽度:opts.imgw,
身高:(选择。imgh + 30),
带:10
},600);

open.fadeout美元();

wrap.animate美元({
宽度:opts.imgw,
身高:opts.imgh
},600);

$(info_area 。

img.animate美元({
margintop:0px
marginleft:0px
},600);

返回false;
});

close.click美元(函数(){()
this.animate美元({
宽度:opts.orgw,
身高:opts.orgh,
带:1
},600);

open.fadein美元();

wrap.animate美元({
宽度:opts.wrapw,
身高:opts.wraph
},600);

img.animate美元({
margintop:150px
marginleft:150px
},600);

$(info_area 。
返回false;
});

});

});
以上是本文的全部代码,希望您能喜欢。

tag:插件特效功能电脑软件jquery

相关内容