$(function () { // wow初始化 new wow().init(); ys.phnavinit(4); // navfixed(); // navhovered(); }); // 导航不在顶部时加类名isfixed function navfixed(){ ys.isfixed(".ys_hd_pc"); } // 鼠标经过导航时加类名ishovered function navhovered(){ ys.ishovered(".ys_hd_pc"); } // 导航 $(".mnlu_li").hover( function() { $(this).addclass("yxnav_active1").siblings().removeclass("yxnav_active1"); $(this).find(".mnlu_li_pull").stop().slidedown(); $(".ys_search2_win").stop().slideup(); }, function() { $(this).removeclass("yxnav_active1"); $(".mnlu_li.act").addclass("yxnav_active1"); $(this).find(".mnlu_li_pull").stop().slideup(); } ) $(".mldc_ul_li").hover( function() { $(this).addclass("yxnav_active2").siblings().removeclass("yxnav_active2"); }, function() { $(this).removeclass("yxnav_active2"); $(".mldc_ul_li.act").addclass("yxnav_active2"); } ) // 检索 $(function(){ $(".ys_search2_btn").click(function(e){ e.stoppropagation(); $(".ys_search2_win").stop().slidetoggle(); }) $(".ys_search2_win input").click(function(e){ e.stoppropagation(); }); }) $('body,html').click(function(){ $('.ys_search2_btn').stop().removeclass('on'); $('.ys_search2_btn').stop().parents(".ys_search2").find(".ys_search2_win").slideup(); $('.ys_search2_btn').stop().parents(".ys_search2").removeclass("act"); });