jquery win 7透明弹出层效果的简洁明了代码-Web前端之家

复制代码 代码如下:$.click { $.chinaz({
windowtitle: “firefox”, windowpositiontop: “center”, windowpositionleft:
“center”, windowwidth: 500, windowheight: 500, windowanimation:
“easeoutcubic” });});
轻松设置弹出层的效果,和弹出方式。很不错的一款jquery弹出层特效

奥门金沙手机娱乐网址,function center(obj){
 var windowWidth = document.documentElement.clientWidth;  
 var windowHeight = document.documentElement.clientHeight;  
 var popupHeight = $(obj).height();  
 var popupWidth = $(obj).width();   
 $(obj).css({  
  “position”: “absolute”,  
  “top”: (windowHeight-popupHeight)/2+$(document).scrollTop(),  
  “left”: (windowWidth-popupWidth)/2  
 }); 
}

showDiv($(“#pop”));
function showDiv(obj){
 $(obj).show();
 center(obj);
 $(window).scroll(function(){
  center(obj);
 });
 $(window).resize(function(){
  center(obj);
 });
}

jquery实现弹出层完美居中效果