$(function(){ navBarOption.init(); carousel.init(); footer.init(); }); //导航条内容加载 var navBarOption={ menuToggleClick:function(){ var flag1=true; $(".nav_header .menu_toggle").click(function(){ var li=null; var width=$(window).width(); var height=$(window).height(); if(width>399){ if(flag1){ $(".menu_toggle_dropDown_con").css({"height":height+"px"}); $("body").css("-webkit-transform","translate3d(-200px, 0, 0)"); $(".menu_toggle_dropDown_con").show(); flag1=false; }else{ $("body").css("-webkit-transform","translate3d(0, 0, 0)").on('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', function() { //alert("回调已经启用"); $(".menu_toggle_dropDown_con").hide(); $("body").unbind("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd"); }); flag1=true; } }else{ if(flag1){ $(".menu_toggle_dropDown_con").css("display","block"); setTimeout(function(){ $(".menu_toggle_dropDown_con").css({"height":height+"px","-webkit-transform":"translate3d(0px, 0, 0)"}); flag1=false; },50); }else{ $(".menu_toggle_dropDown_con").css({"-webkit-transform":"translate3d("+width+"px, 0, 0)"}).on('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', function() { $(".menu_toggle_dropDown_con").css("display","none"); $(".menu_toggle_dropDown_con").unbind("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd"); flag1=true; }); } } $(".menu_toggle_dropDown_con .navItemToggle").each(function(x){ if(x==0 || x==4 || x==5 || x==10){} else{ //$(this).find(".menu_toggle_dropDown_con_menu").css({"height":0,"overflow":"hidden","transition":"height 1s"}); if($(this).find("span").html()==$(".main .breadMenu .bread2").html()){ $(this).find(".menu_toggle_dropDown_con_menu").css({"height":$(this).find("li").eq(0).height()*$(this).find("li").length}); $($(this).find(".menu_toggle_dropDown_con_menu li")).each(function(){ if($(this).find("a").html()==$(".main .breadMenu .bread3").html().replace(/[\s]+/g,"")){ $(this).find("a").css("color","#2c95db"); } }); } $(this).click(function(){ var flag=true; if(flag){ $(this).find(".menu_toggle_dropDown_con_menu").css({"height":$(this).find("li").eq(0).height()*$(this).find("li").length}); $(this).siblings().find(".menu_toggle_dropDown_con_menu").css({"height":"0px"}); flag=false; }else{ $(this).find(".menu_toggle_dropDown_con_menu").css({"height":"0px"}); flag=true; } }); } }); $(".li_globel").hover(function(){ $("header .head_top_right .arr").show(); $("header .head_top_right .globel").show(); },function(){ $("header .head_top_right .arr").hide(); $("header .head_top_right .globel").hide(); }); }); }, init:function(){ this.menuToggleClick(); $(".menu_toggle_dropDown_con_menu").css({"height":0,"overflow":"hidden","transition":"height 0.7s"}); $("header .nav_header .menu_toggle_dropDown_con_menu").css("display","block"); $(".menu_toggle_dropDown_con").css({"transform":"translate3d("+$(window).width()+"px, 0, 0)","transition":"-webkit-transform 1s ease","height":$("header").height()+$(".main").height()+$("footer").height()}); } }; var carousel= { bianliang: {"src": ["assets/images/lunboImg/c1.png", "assets/images/lunboImg/c2.png", "assets/images/lunboImg/c3.png"],"src2":["assets/images/lunboImg/carousel1_1.png","assets/images/lunboImg/carousel2_2.png","assets/images/lunboImg/carousel3_3.png"]}, carouselOption:function(){ var div=$("
"); var ul=$("