jquery弹出层类代码分享
代码如下:
var t9 = new popuplayer({trigger:"#ele9",popupblk:"#blk9",closebtn:"#close9",
useoverlay:true,usefx:true,offsets:{x:0,y:-41}});
t9.doeffects = function(way){
if(way == "open"){
this.popuplayer.css({opacity:0.3}).show(400,function(){
this.popuplayer.animate({
left:($(document).width() - this.popuplayer.width())/2,
top:(document.documentelement.clientheight -
this.popuplayer.height())/2 + $(document).scrolltop(),
opacity:0.8
},1000,function(){this.popuplayer.css("opacity",1)}.binding(this));
}.binding(this));
}
else{
this.popuplayer.animate({
left:this.trigger.offset().left,
top:this.trigger.offset().top,
opacity:0.1
},{duration:500,complete:function(){
this.popuplayer.css("opacity",1);this.popuplayer.hide()}.binding(this)});
}
}
上一篇: 微信版本再次更新,漂流瓶功能彻底下架
下一篇: 效果超级好的五种推广手段分享