//导航栏 $(".rqheader .pcnav .waili").mouseenter(function(){ $(this).find(".navlb").stop().slidedown(); }) $(".rqheader .pcnav .waili").mouseleave(function(){ $(this).find(".navlb").stop().slideup(); }) //搜索框 $(".rqheader .za .sousuo").mouseenter(function(){ $(this).addclass("focus"); }) $(document).on("click", ".rqheader .za .sousuo .shuru", function (e) { e.preventdefault(); e.stoppropagation(); }) $(document).on("click", ".rqheader .za .sousuo .xuanz", function (e) { e.stoppropagation(); }) $(window).on('click',function(){ if($(".rqheader .za .sousuo").hasclass("focus")){ $(".rqheader .za .sousuo").removeclass("focus"); } }) //底部微信 //$(".rqfooter .two .weixin").mouseenter(function(){ // $(this).find(".ewm").stop().fadein(); //}) //$(".rqfooter .two .weixin").mouseleave(function(){ // $(this).find(".ewm").stop().fadeout(); //}) //手机导航栏 $(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"); }); //手机导航栏结束