fontSize(); $(window).resize(function(){ fontSize(); }); function fontSize(){ var size; var winW=$(window).width(); if(winW<=1760 && winW>800){ size=Math.round(winW/17.6); }else if(winW<=800){ size=Math.round(winW/7.5); if(size>65){ size=65; } }else{ size=100; } $('html').css({ 'font-size':size+'px' }) } $(function () { if ($(window).width() < 1004) { $('.achievementshow1 .content').find('img').css('width', '100%'); $('.achievementshow1 .content').find('img').css('height', 'auto'); $('.achievementshow1 .content').find('input').css('width', '100%'); $('.achievementshow1 .content').find('input').css('height', 'auto'); } //-- $('.tabContentDiv').find('.tabContent:first').show(); $('.tab').each(function(i){ $(this).find('li').each(function(ii){ $(this).hover( function(){ $('.tab').eq(i).find('li').removeClass('liNow'); $(this).addClass('liNow'); $('.tabContentDiv').eq(i).find('.tabContent').hide(); $('.tabContentDiv').eq(i).find('.tabContent').eq(ii).show(); }, function(){} ) }) }) //-- $('.tabContentDiv2').find('.tabContent2:first').show(); $('.tab2').each(function(i){ $(this).find('li').each(function(ii){ $(this).click( function(){ $('.tab2').eq(i).find('li').removeClass('liNow'); $(this).addClass('liNow'); $('.tabContentDiv2').eq(i).find('.tabContent2').hide(); $('.tabContentDiv2').eq(i).find('.tabContent2').eq(ii).show(); } ) }) }) //-- $('.pagenavph').find('.now').click(function () { $('.pagenavph').find('.list').fadeToggle(); $('.pagenavph').find('.now').toggleClass('blak'); }) $('.listHover').find('li').hover( function(){ $(this).addClass('on'); }, function(){ $(this).removeClass('on'); } ) //-- $('.topA').click(function(){ $('body,html').animate({scrollTop: 0}, 500); }) //-- $('.sideTitleTel').find('.tan').toggle( function(){ $('.sideTitleNav').show(); $('.sideTitleTel').find('.con').addClass('on'); }, function(){ $('.sideTitleNav').hide(); $('.sideTitleTel').find('.con').removeClass('on'); } ) //-- if($(window).width()>=1004){ $(".indexPart3").find('.list').find('li').hover( function(){ $(this).find('.hideBox').height($(this).height()); $(this).find('.hideBox').fadeIn(200); }, function(){ $(this).find('.hideBox').fadeOut(200); } ) } //-- $('.navIco').click(function(){ $('.navLayer').animate({right: "0",width:"100%"}, 500); $('.searchLayerTel').fadeOut(500); $('.pageBg').fadeIn(500); }) $('.navLayer').find('.closeBtn').click(function(){ $('.navLayer').animate({right: "-100%",width:0}, 500); $('.navLayer').find('a').removeClass('aNow'); $('.navLayer').find('.list').hide(); $('.pageBg').fadeOut(500); }) //-- $(".subNav1").click(function(){ $(this).toggleClass("currentDt").siblings(".subNav1").removeClass("currentDt") $(this).next(".navContent").slideToggle(300).siblings(".navContent").slideUp(500) }) //-- $('.searchIco').click(function(){ $('.searchLayerTel').fadeIn(500); $('.pageBg').fadeIn(500); $('.navLayer').animate({right: "-100%",width:0}, 500); }) //-- $('.pageBg').click(function(){ $('.searchLayerTel').fadeOut(500); $('.pageBg').fadeOut(500); }) //-- $('.sideBar').find('li').hover( function(){ $(this).addClass('liNow'); }, function(){ $(this).removeClass('liNow'); } ) //-- $('.headDiv').find('.div1').each(function(i){ $(this).hover( function(){ $('.headDiv').find('.div1').find('.layerDiv').fadeIn(500); $('.headDiv').find('.div1').addClass('on'); }, function(){ $('.headDiv').find('.div1').find('.layerDiv').fadeOut(500); $('.headDiv').find('.div1').removeClass('on'); } ) }) //-- $('.headDiv').find('.div2').each(function(i){ $(this).hover( function(){ $('.headDiv').find('.div2').find('.list').fadeIn(500); $('.headDiv').find('.div2').addClass('on'); }, function(){ $('.headDiv').find('.div2').find('.list').fadeOut(500); $('.headDiv').find('.div2').removeClass('on'); } ) }) //-- $('.headDiv').find('.lan').each(function(i){ $(this).hover( function(){ $('.headDiv').find('.lan').find('.list').show(); $('.headDiv').find('.lan').addClass('on'); }, function(){ $('.headDiv').find('.lan').find('.list').hide(); $('.headDiv').find('.lan').removeClass('on'); } ) }) //-- $('.sNavA').each(function(i){ $(this).hover( function(){ $('.sNavA').eq(i).addClass('aNow'); if(i<3){ $('.sNav').eq(i).css('left',$(this).offset().left); }else{ var winW = $(window).outerWidth(); var liW = $(".nav li").eq(i+1).outerWidth(); var sNavr = winW-$(".nav li").eq(i+1).offset().left-liW; $('.sNav').eq(i).css('right',sNavr); } $('.sNav').eq(i).show().stop().animate({top: 94}, 150); }, function(){ $('.sNavA').removeClass('aNow'); $('.sNav').hide().stop().animate({top: 80}, 150); } ) }) $('.sNav').each(function(i){ $(this).hover( function(){ $('.sNavA').eq(i).addClass('aNow'); $(this).show().stop().animate({top: 94}, 150); }, function(){ $('.sNavA').removeClass('aNow'); $('.sNav').hide(); } ) }) //-- $('.navIcoPC').click(function(){ $('.navRight').animate({right: "0",width:"362px"}, 500); $('.pageBg').fadeIn(500); }) //-- $('.navRight').find('.closeBtn').click(function(){ $('.navRight').animate({right: "-362px",width:0}, 500); $('.pageBg').fadeOut(500); }) //-- $(".dubNav1").click(function(){ $(this).toggleClass("durrentDt").siblings(".dubNav1").removeClass("durrentDt") $(this).find(".davContent").slideToggle(300).siblings(".davContent").slideUp(500) $(this).siblings(".dubNav1").find(".davContent").slideUp(500) }) //涓嬫媺閫氱敤 $('.select').each(function(i){ function showFn(selectObj) { //灞曞紑鏁堟灉 // 鎶婂叾浠栫殑涓嬫媺鏀惰捣 $('.select').children("dd").slideUp(200); selectObj.children("dd").slideDown(200); selectObj.addClass('on'); } function hideFn(selectObj){ //鍏抽棴鏁堟灉 selectObj.children("dd").slideUp(200); selectObj.removeClass('on'); } function hideAll(){ $('.select dd').slideUp(200); }; $(this).children('dt').click(function(){ var index = $(this).parent().index(); var selectObj = $(this).parent(); $(this).next().is(":hidden")?showFn(selectObj):hideFn(selectObj); }); $(this).children('dd').find("li").click(function(){ var index = $(this).closest('.select').index(); var dataId=$(this).attr('data-id'); var selectObj = $(this).closest('.select'); $(this).closest('.select').children("dt").find('a').html($(this).html()); $(this).closest('.select').children("dt").find('a').attr('data-id',dataId); hideFn(selectObj); }); $("body").click(function(i){ !$(i.target).parents(".select").first().is($(".select")) ? hideAll():""; }); }); //-- var bolExec = false; if ($(".LineNum").length > 0) { $(window).scroll(function () { var winheight = $(window).height() / 1.1; var Current = $(".LineNum").offset().top; if ($(document).scrollTop() > Current / 4.3 && bolExec == false) { var line = $(".LineNum"), len = line.length; line.each(function (index, element) { var t = $.trim($(this).text()).replace(" ", "").length; var text = ""; for (var j = 0; j < t; j++) text += 0; $(this).text(text); }); function Animate(i) { if (i < len) { var _this = line.eq(i), a = 0, v = _this.attr("rel") - 0, _time = 100, vLen = (v + "").length; var t = setInterval(function () { a += 1; var pi = parseInt(v / 100 * a); var text = ""; for (var j = 0; j < vLen - (pi + "").length; j++) text += 0; _this.text(text + pi); if (a == _time / 2) Animate(i + 1); if (a >= _time) clearInterval(t); }, 1); } } Animate(0); bolExec = true; } }) } // var date = new Date(); var year = date.getFullYear(); var month = date.getMonth()+1; var day = date.getDate(); var qingming = year+"-"+month+"-"+day ; if(qingming == "2020-4-4") { $("body").css({ "-webkit-filter": "grayscale(1)","filter": "gray","filter": "grayscale(1)" })} }) jQuery(document).ready(function($){ // browser window scroll (in pixels) after which the "back to top" link is shown var offset = 300, //browser window scroll (in pixels) after which the "back to top" link opacity is reduced offset_opacity = 1200, //duration of the top scrolling animation (in ms) scroll_top_duration = 700, //grab the "back to top" link $back_to_top = $('.cd-top'); //hide or show the "back to top" link $(window).scroll(function(){ ( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out'); if( $(this).scrollTop() > offset_opacity ) { $back_to_top.addClass('cd-fade-out'); } }); //smooth scroll to top $back_to_top.on('click', function(event){ event.preventDefault(); $('body,html').animate({ scrollTop: 0 , }, scroll_top_duration ); }); });