$(function(){ $('.search_tit li').mouseover(function() { var idx = $(this).index(); $(this).addClass('hot').siblings('li').removeClass('hot'); $('.part_search .search_box .form_box').eq(idx).addClass('hot').siblings('.form_box').removeClass('hot'); }); $('.nav li').hover(function() { $(this).find('a').addClass('hover').siblings('dl').slideDown(); }, function() { $(this).find('a').removeClass('hover').siblings('dl').hide(); }); $('.nav_icon2').click(function() { $('.nav_bg').fadeIn('fast', function() { $('.nav').show(); }); }); $('.nav_bg').click(function() { $('.nav').hide('fast', function() { $('.nav_bg').fadeOut('fast'); }); }); // 搜索部分代码 $('.serachinfo p').mouseover(function() { $(this).siblings('ul').show(); }); $('.serachinfo ul li').click(function() { var htm = $(this).find('span').html(); $('.serachinfo p').html(htm); $(this).parent().hide(); }); $('.serachinfo').mouseleave(function() { $(this).find('ul').hide(); }); $('.news_box .news_title span').mouseover(function() { var idx = $(this).index(); if (idx==0) { $('.news_box .news_title a').eq(0).show().siblings('a').hide(); $('.news_list ul').eq(0).show().siblings('ul').hide(); } else{ $('.news_box .news_title a').eq(1).show().siblings('a').hide(); $('.news_list ul').eq(1).show().siblings('ul').hide(); } $(this).addClass('hot').siblings('span').removeClass('hot'); }); TouchSlide({ slideCell:"#slideBox", titCell:".hd ul", mainCell:".bd ul", effect:"leftLoop", autoPage:true, autoPlay:true }); var wid = $(window).width(); if (wid < 1000) { $('.nav li>a:not(:first)').removeAttr("href"); } });