$(function () { //导航 $(".navt_ul").on("click", function () { if (!$(".navt_ul").hasclass("cur")) { $(".navt_ul,#navwrapper,#footer").addclass("cur"); $("#navwrapper").stop().animate({ width: 220 }); $("#footer").stop().animate({ right: 0 }); $("video").css({ "display": "none" }); } else { $(".navt_ul,#navwrapper,#footer").removeclass("cur"); $("#navwrapper").stop().animate({ width: 0 }); $("#footer").stop().animate({ right: -220 }); $("video").css({ "display": "block" }); } }) if ($(window).width() < 800) { //兼容苹果事件 $("div").on("mouseover", function () { }); //处理苹果下拉弹性 var st = 0; $(window).scroll(function () { st = $("#header").offset().top; if ($(window).width() < 800) { if (st > 0) { $(".in_bg5,.in_bg6").css({ "display": "block" }); $(".in_bg2").css({ "height": "200px" }) } else { $(".in_bg5,.in_bg6").css({ "display": "none" }); $(".in_bg2").css({ "height": "400px" }) } } else { $(".in_bg2").css({ "height": "auto" }) } }) $(".bu5_te span,.bu1_te span").attr({ "style": "" }); } $("#navwrapper .content .nav .navitem").hover(function () { $(this).find(".sub_null").css({ "display": "none" }); // var _th = $(this); // settimeout(function () { // _th.find(".sub_null").css({ "display": "none" }); // },400) }, function () { $(this).find(".sub_null").css({ "display": "block" }); }) $(".navul_li").on("click", function () { $(this).find(".navi_ul").stop(true, true).slidetoggle(); $(this).siblings().find(".navi_ul").stop(true, true).slideup(); }) })