jquery實現彈出層完美居中效果
center(obj);
});
}
}
}); >
function center(obj){
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.doccom > var popupWidth = $(obj).width();
$(obj).css({
"position": "absolute",
> "top": (windowHeight ) $ (document).scrollTop(),
"left": (windowWidth-popupWidth)/2