k(function () { $('body,html').animate({ scrollTop: 0 }, 100); return false; }); function show(str) { $(".alert-mask").show(); $(".alert-mask .text").text(str); } $(".alert-mask .text").click(function (e) { e.stopPropagation(); }); $(".alert-mask").click(function (e) { if (e.target !== $(".alert-mask .text")) { $(".alert-mask").hide(); } }); $('.menu-info-wrap').show(); //首页导航下拉显示 // 首页链接新窗口打开 // $('body').find('a').attr('target','_blank') //资讯版块左右切换 $('.jgxx .issue .title li').click(function () { var index = $(this).index(); $(this).parent().children('li').removeClass('active'); $(this).addClass('active'); $('.jgxx .issue .i-content').css({ marginLeft: '-' + 428 * index + 'px' }) }) $('.zzxx .issue .title li').click(function () { var index = $(this).index(); $(this).parent().children('li').removeClass('active'); $(this).addClass('active'); $('.zzxx .issue .i-content').css({ marginLeft: '-' + 428 * index + 'px' }) }) $('.five-year .issue .title li').click(function () { var index = $(this).index(); $(this).parent().children('li').removeClass('active'); $(this).addClass('active'); $('.five-year .issue .i-content').css({ marginLeft: '-' + 428 * index + 'px' }) }) // 热门专业切换 $('.hot-zy .t-list li').hover(function(){ var index = $(this).index(); $('.hot-zy .t-list li').removeClass('active'); $(this).addClass('active'); $('.hot-zy .h-body .right > ul').hide(); $('.hot-zy .h-body .right > ul').eq(index).show(); // 修复启用不显示 if(typeof($('.hot-zy .h-body .right > ul').eq(index).find('img').attr('data-lazy-src')) !== 'undefined'){ $.each($('.hot-zy .h-body .right > ul').eq(index).find('img'),function(i,v){ $(v).attr('src',$(v).attr('data-lazy-src')); $(v).removeAttr('data-lazy-src') }) } })