Do(function() { var nav_list = [$(".nav_chost"),$(".nav_dyDNS"), $(".nav_service_support")]; var nav_list_ul = [$(".chost"),$(".dyDNS"), $(".service_support")]; $.each(nav_list, function(i, n) { n.hover(function() { nav_list_ul[i].css("display", "block"); }, function() { nav_list_ul[i].css("display", "none"); }); }); $.each(nav_list_ul, function(i, n) { n.hover(function() { n.css("display", "block"); nav_list[i].addClass("nav_hover") }, function() { n.css("display", "none"); nav_list[i].removeClass("nav_hover") }); }); }); //弹出框 var ui = {}; ui.createMask = function(g, isBg, h) { ui.removeMask(); var $bodyobj = $(document.body); var bodywidth = $bodyobj.width(); var bodyheight = $(document).height(); var getPosLeft = (bodywidth - parseInt(h.width)) / 2; var getPosTop = (document.documentElement.scrollTop > 0 ? document.documentElement.scrollTop : document.body.scrollTop) + 150; if (isBg) { var c = $("
"); c.css({ position : "absolute", top : 0, left : 0, "z-index" : 1000, width : bodywidth, height : bodyheight, "background-color" : "#000000", opacity : 0.4 }); c.appendTo($bodyobj) } var f = $("
" + "
" + "
" + "
"); if (h) { f.css({ top : h.top, right : h.right }) } if (h) { f.find("div").css({ width : h.width, 'min-height' : h.height, '_height' : h.height, background : h.background }) } f.appendTo($bodyobj); g.appendTo($("#msgdiv")); $(".pop_close,.pop_cancel").bind("click", function() { ui.removeMask(); }) } //关闭层 ui.removeMask = function() { $("#graymaskdiv").detach(); $("#msgwhole").detach(); }