$(".sstu").click(function(){ if($(this).hasclass("cha")){ $(".input_box").css("opacity","0").css("transition","all .3s .3s linear").css("margin-left","30px"); $(".secti").css("max-height","0").css("transition","max-height .3s linear .3s"); $(this).removeclass("cha"); $(".sskuang").css("visibility","hidden"); }else{ $(".sskuang").css("visibility","visible"); $(".input_box").css("opacity","1").css("transition","all .3s .3s linear").css("margin-left","0"); $(".secti").css("max-height","300px").css("transition","max-height .5s linear .4s"); $(this).addclass("cha"); } }) //导航处的滑块 $(".gyhead .pc_nav .wail").mouseenter(function(){ $(".gyhead .pc_nav .wail").removeclass("on"); // $(".gyhead .pc_nav .fuceng").css("left",(12.5*$(this).index())+"%"); }) $(".gyhead .pc_nav .wail").mouseleave(function(){ $(".gyhead .pc_nav .wail.cur").addclass("on"); // $(".gyhead .pc_nav .fuceng").css("left",(12.5*$(".gyhead .pc_nav .wail.on").index())+"%"); }) $(".gyhead .pc_nav .wail").hover(function(){ $(this).find(".navlb").stop().slidedown(800); },function(){ $(this).find(".navlb").stop().slideup(); }) //手机导航栏 $(document).on('click','.toggle',function(){ $(this).parent().toggleclass('visible_nav'); if($('.phone_nav').hasclass('view-submenu')){ $('.phone_nav').removeclass('view-submenu'); submenu.hide(); }else{ $('.phone_nav').addclass('view-submenu'); } //控制导航样式 $('.phone_ul').css('height', $(window).height() - 60); $('.phone_ul').css({ 'height': $(window).height() - 60, 'top':60 }) }); //添加关闭按钮 var submenu = $('.submenu'); $('.phone_ul li span').click(function(){ $('.phone_nav').addclass('view-submenu'); submenu.hide(); $(this).parents('li').find('.submenu').show(); }); $('.hide-submenu').on('click', function () { $('.phone_nav').removeclass('view-submenu'); $(this).parent().css('display','none'); }); var sanmenu = $('.sanmenu'); $('.phone_ul li .submenu span').click(function(){ sanmenu.hide(); $(this).parents('li').find('.sanmenu').show(); console.log("1"); }); $('.hide-sanm').on('click', function () { $(this).parent().css('display','none'); console.log("1"); }); //手机导航栏结束 //轮播图处的滑块 $(".indexone .indfen li").mouseenter(function(){ $(".indexone .indfen .fuce").css("left",$(this).index()*25 + "%"); }) //返回顶部 $(".celan .mli .ms").click(function(){ $("html,body").animate({scrolltop:0}); }); //index.html var lefty = $(".indexfive .inqieh .fuceng").css('left'); //console.log(lefty); $(".indexfive .inqieh li").eq(0).addclass("on active"); $(".indexfive .ti").eq(0).css("display","block"); $(".indexfive .inqieh li").click(function(){ $(".indexfive .inqieh li").removeclass("on active"); $(this).addclass("on active"); $(".indexfive .ti").css("display","none"); $(".indexfive .ti").eq($(this).index()).css("display","block"); $(".indexfive .inqieh .fuceng").css("left",$(this).index()*(137+20)); lefty = $(this).index()*(137+20); }) $(".indexfive .inqieh li").mouseenter(function(){ $(".indexfive .inqieh li").removeclass("active"); $(".indexfive .inqieh .fuceng").css("left",$(this).index()*(137+20)); }) $(".indexfive .inqieh li").mouseleave(function(){ $(".indexfive .inqieh li.on").addclass("active"); $(".indexfive .inqieh .fuceng").css("left",lefty); }) var lefy = $(".indexsix .inqieh .fuceng").css('left'); //console.log(lefy); $(".indexsix .inqieh li").eq(0).addclass("on active"); $(".indexsix .ti").eq(0).css("display","block"); $(".indexsix .inqieh li").click(function(){ $(".indexsix .inqieh li").removeclass("on active"); $(this).addclass("on active"); $(".indexsix .ti").css("display","none"); $(".indexsix .ti").eq($(this).index()).css("display","block"); $(".indexsix .inqieh .fuceng").css("left",$(this).index()*(137+20)); lefy = $(this).index()*(137+20); }) $(".indexsix .inqieh li").mouseenter(function(){ $(".indexsix .inqieh li").removeclass("active"); $(".indexsix .inqieh .fuceng").css("left",$(this).index()*(137+20)); }) $(".indexsix .inqieh li").mouseleave(function(){ $(".indexsix .inqieh li.on").addclass("active"); $(".indexsix .inqieh .fuceng").css("left",lefy); }) //lx_zp.html $(".lxzptwo .ti .dj").click(function(){ $(".lxzptwo .ti .zpnr").slideup(); if($(this).hasclass("on")){ $(this).parents(".bth").siblings(".zpnr").slideup(); $(this).removeclass("on"); }else{ $(this).parents(".bth").siblings(".zpnr").slidedown(); $(".lxzptwo .ti .dj").removeclass("on"); $(this).addclass("on"); } }) //ab_xs.html if($(window).width()>767){ $(".xsqytwo .ti .ditu .kuang").hover(function(){ $(this).find(".wenz").stop().fadein(); },function(){ $(this).find(".wenz").stop().fadeout(); }) }