// JavaScript Document $( function() { var PcWidth = $(window).width(); //案例滚动效果 $(".cenCaseCon button").hover(function(){ $(this).fadeTo("show", 0.8) },function(){ $(this).fadeTo("show", 1) }); $("#cen").slide({mainCell:".cenCasePic ul",autoPage:true,effect:"leftLoop",autoPlay:false,vis:4,trigger:"click"}); //结束 $('.cenCasePic li').hover(function(){ $(this).find('h3').css('display','block').animate({top:90},250); $(this).find('span').css('display','block').animate({top:120},250) },function(){ $(this).find('h3,span').removeAttr('style') }); //菜单动画 $('li').hover(function(){ $(this).find(".IconWx,.IconTx").animate({top:'-28px'},222); $(this).find(".TmStyle").animate({top:'-80px',height:'80px'},300); $(this).find(".TmLine").animate({top:'-120px',height:'3px'},300); },function(){ $(this).find(".IconWx,.IconTx").animate({top:'0px'},222); $(this).find(".TmStyle").animate({top:'0px',height:'0px'},100) $(this).find(".TmLine").animate({top:'0px',height:'0px'},200); }); //焦点图效果 if(PcWidth>=1004){ $(".banner button").hover(function(){ $(this).fadeTo("show", 0.8) },function(){ $(this).fadeTo("show", 1) }); $(".banner").slide({ titCell: ".brNum ul", mainCell: ".brImg ul", effect:"fold", autoPlay:true, autoPage:true, mouseOverStop:false, trigger: "click", startFun: function(i,c) { var curLi = jQuery(".banner .brImg li").eq(i); if ( !! curLi.attr("_src")){ curLi.css("background-image", curLi.attr("_src")).removeAttr("_src") } $('.Num').html('' + '0' + (i + 1) + '' + '/' + '0' + c) } }); }; //结束 //页面重新加载 function baseWidth(){ var winScreen = $(window).width(); //首页元素动画 $('.cenAboutCon img,.cenCasePic li').addClass('wow fadeInLeft'); $('.cenAboutCon p').addClass('wow flipInX'); $('.cenMapCon h4').addClass('wow fadeInUp'); $('.cenMapCon span').addClass('wow fadeInDown'); if(winScreen<1260){ $('.cenCaseCon h4,.caseMore,.txtAbc').addClass('wow fadeInDown'); $('.cenCasePic li,.newsMore').addClass('wow fadeInUp'); $('.cenNewsCon li:odd').addClass('wow bounceInRight'); $('.cenNewsCon li:even').addClass('wow bounceInLeft'); }else{ $('.cenCaseCon h4,.caseMore').addClass('wow rotateInDownRight'); $('.newsMore').addClass('wow bounceInLeft'); $('.cenNewsCon li').addClass('wow bounceInUp'); }; $('.cenNewsCon li').hover(function(){ $(this).find('span').addClass('animated pulse'); $(this).find('h3 a').addClass('transA colorHoverA'); $(this).find('b').addClass('transA colorHoverB'); },function(){ $(this).find('span').removeClass('animated pulse'); $(this).find('h3 a').removeClass('colorHoverA'); $(this).find('b').removeClass('colorHoverB'); }); //电脑端删除 if(winScreen>1004 && winScreen<1260){ $('.brImg').find('li').css({'background-size':'auto 450px','background-position':'center top'}); }; if(winScreen>=1260){ $('.cenCasePic').find('li').removeAttr('style'); $('.brImg').find('li').css({'background-size':'auto auto'}); }; //结束 //案例 if(winScreen>=1260){ $('.cenCaseCon button,.ColBla,.cenNewsCon span,.cenNewsCon p,.cenNewsCon img').removeAttr('style'); var LiNum=$('.cenNewsCon li').length; if(LiNum>3){ $('.cenNewsCon').find('li').last().css('display','none'); }else{ $('.cenNewsCon').find('li').last().removeAttr('style','') } $('.cenNewsCon').find('li').first().css('margin','0'); }else{ $('.cenCaseCon button,.ColBla,.cenNewsCon span,.cenNewsCon p,.cenNewsCon img').css('display','none'); $('.cenNewsCon').find('li').removeAttr('style'); $('.cenCasePic li').eq(5).css('display','none'); $('.cenCasePic li').eq(4).css('display','none'); } //案例 if( winScreen>=1260 ){ $('#Link').attr('href','/templates/index/css/FiStyle.css'); $('.cenCasePic').css('width','960px'); }else if( winScreen<1260){ $('#Link').attr('href','/templates/index/css/ThStyle.css'); $('.cenCasePic').css('width','984px'); }; //结束 } baseWidth(); $(window).resize( function() {baseWidth();}); //加载结束 });