//弹出div
function popupDiv(div_id) {
var div_obj = $("#" + div_id);
//窗口宽度,高度
var winWidth = $(window).width();
var winHeight = $(window).height();
//弹出的div的宽度,高度
var popHeight = div_obj.height();
var popWidth = div_obj.width();
div_obj.animate({ opacity: "show", left: (winWidth - popWidth) / 2, top: (winHeight - popHeight) / 2, width: popWidth, height: popHeight }, 300);
}
//隐藏DIV
function hideDiv(div_id) {
$("#" + div_id).animate({ opacity: "hide" }, 300);
}
function popupDiv(div_id) {
var div_obj = $("#" + div_id);
//窗口宽度,高度
var winWidth = $(window).width();
var winHeight = $(window).height();
//弹出的div的宽度,高度
var popHeight = div_obj.height();
var popWidth = div_obj.width();
div_obj.animate({ opacity: "show", left: (winWidth - popWidth) / 2, top: (winHeight - popHeight) / 2, width: popWidth, height: popHeight }, 300);
}
//隐藏DIV
function hideDiv(div_id) {
$("#" + div_id).animate({ opacity: "hide" }, 300);
}