Difference between revisions of "Team:SSTi-SZGD/js/Team"

(Created page with "自定义Team效果: $(function(){ $(".header .nav .mainnav").eq(1).hover(function(){ $(".header .nav .Team span").css("color","#FAEE0D"); },function(){ $(".header .n...")
 
Line 31: Line 31:
 
if(footerTop<winHeight-100){
 
if(footerTop<winHeight-100){
 
setTimeout(function(){
 
setTimeout(function(){
$(".footer").addClass("a-fadein");
+
$(".footer").addClass("a-fadeinB");
 
$(".footer").css("display","block");
 
$(".footer").css("display","block");
 
},150);
 
},150);
Line 147: Line 147:
 
if(footerTop<winHeight-100){
 
if(footerTop<winHeight-100){
 
setTimeout(function(){
 
setTimeout(function(){
$(".footer").addClass("a-fadein");
+
$(".footer").addClass("a-fadeinB");
 
$(".footer").css("display","block");
 
$(".footer").css("display","block");
 
},150);
 
},150);

Revision as of 07:27, 31 July 2017

/*自定义Team效果*/ $(function(){ $(".header .nav .mainnav").eq(1).hover(function(){ $(".header .nav .Team span").css("color","#FAEE0D"); },function(){ $(".header .nav .Team span").css("color","#FAEE0D"); }); });


/*延时加载*/ $(function(){ var winHeight=$(window).height(); var footerTop=$(".footer_box").offset().top-$(window).scrollTop(); var RebekahTop=$(".Rebekah").parent().offset().top-$(window).scrollTop(); var RichardTop=$(".Richard").parent().offset().top-$(window).scrollTop(); var JoyceTop=$(".Joyce").parent().offset().top-$(window).scrollTop(); var BobTop=$(".Bob").parent().offset().top-$(window).scrollTop(); var CarolTop=$(".Carol").parent().offset().top-$(window).scrollTop(); var LindaTop=$(".Linda").parent().offset().top-$(window).scrollTop(); var YolandaTop=$(".Yolanda").parent().offset().top-$(window).scrollTop(); var JasmineTop=$(".Jasmine").parent().offset().top-$(window).scrollTop(); var VivianTop=$(".Vivian").parent().offset().top-$(window).scrollTop(); var LuckyTop=$(".Lucky").parent().offset().top-$(window).scrollTop(); var KennyTop=$(".Kenny").parent().offset().top-$(window).scrollTop(); var Ying_PengTop=$(".Ying_Peng").parent().offset().top-$(window).scrollTop(); var Jianglin_YuTop=$(".Jianglin_Yu").parent().offset().top-$(window).scrollTop(); var Shuqiao_YuTop=$(".Shuqiao_Yu").parent().offset().top-$(window).scrollTop(); var Zhaoying_GuanTop=$(".Zhaoying_Guan").parent().offset().top-$(window).scrollTop();

if(footerTop<winHeight-100){ setTimeout(function(){ $(".footer").addClass("a-fadeinB"); $(".footer").css("display","block"); },150); } if(RebekahTop<winHeight-100){ setTimeout(function(){ $(".Rebekah").addClass("a-fadein"); $(".Rebekah").css("display","block"); },150); } if(RichardTop<winHeight-100){ setTimeout(function(){ $(".Richard").addClass("a-fadein"); $(".Richard").css("display","block"); },150); } if(JoyceTop<winHeight-100){ setTimeout(function(){ $(".Joyce").addClass("a-fadein"); $(".Joyce").css("display","block"); },150); } if(BobTop<winHeight-100){ setTimeout(function(){ $(".Bob").addClass("a-fadein"); $(".Bob").css("display","block"); },150); } if(CarolTop<winHeight-100){ setTimeout(function(){ $(".Carol").addClass("a-fadein"); $(".Carol").css("display","block"); },150); } if(LindaTop<winHeight-100){ setTimeout(function(){ $(".Linda").addClass("a-fadein"); $(".Linda").css("display","block"); },150); } if(YolandaTop<winHeight-100){ setTimeout(function(){ $(".Yolanda").addClass("a-fadein"); $(".Yolanda").css("display","block"); },150); } if(JasmineTop<winHeight-100){ setTimeout(function(){ $(".Jasmine").addClass("a-fadein"); $(".Jasmine").css("display","block"); },150); } if(VivianTop<winHeight-100){ setTimeout(function(){ $(".Vivian").addClass("a-fadein"); $(".Vivian").css("display","block"); },150); } if(LuckyTop<winHeight-100){ setTimeout(function(){ $(".Lucky").addClass("a-fadein"); $(".Lucky").css("display","block"); },150); } if(KennyTop<winHeight-100){ setTimeout(function(){ $(".Kenny").addClass("a-fadein"); $(".Kenny").css("display","block"); },150); } if(Ying_PengTop<winHeight-100){ setTimeout(function(){ $(".Ying_Peng").addClass("a-fadein"); $(".Ying_Peng").css("display","block"); },150); } if(Jianglin_YuTop<winHeight-100){ setTimeout(function(){ $(".Jianglin_Yu").addClass("a-fadein"); $(".Jianglin_Yu").css("display","block"); },150); } if(Shuqiao_YuTop<winHeight-100){ setTimeout(function(){ $(".Shuqiao_Yu").addClass("a-fadein"); $(".Shuqiao_Yu").css("display","block"); },150); } if(Zhaoying_GuanTop<winHeight-100){ setTimeout(function(){ $(".Zhaoying_Guan").addClass("a-fadein"); $(".Zhaoying_Guan").css("display","block"); },150); }

$(window).scroll(function(){ winHeight=$(window).height(); footerTop=$(".footer_box").offset().top-$(window).scrollTop(); RebekahTop=$(".Rebekah").parent().offset().top-$(window).scrollTop(); RichardTop=$(".Richard").parent().offset().top-$(window).scrollTop(); JoyceTop=$(".Joyce").parent().offset().top-$(window).scrollTop(); BobTop=$(".Bob").parent().offset().top-$(window).scrollTop(); CarolTop=$(".Carol").parent().offset().top-$(window).scrollTop(); LindaTop=$(".Linda").parent().offset().top-$(window).scrollTop(); YolandaTop=$(".Yolanda").parent().offset().top-$(window).scrollTop(); JasmineTop=$(".Jasmine").parent().offset().top-$(window).scrollTop(); VivianTop=$(".Vivian").parent().offset().top-$(window).scrollTop(); LuckyTop=$(".Lucky").parent().offset().top-$(window).scrollTop(); KennyTop=$(".Kenny").parent().offset().top-$(window).scrollTop(); Ying_PengTop=$(".Ying_Peng").parent().offset().top-$(window).scrollTop(); Jianglin_YuTop=$(".Jianglin_Yu").parent().offset().top-$(window).scrollTop(); Shuqiao_YuTop=$(".Shuqiao_Yu").parent().offset().top-$(window).scrollTop(); Zhaoying_GuanTop=$(".Zhaoying_Guan").parent().offset().top-$(window).scrollTop();

if(footerTop<winHeight-100){ setTimeout(function(){ $(".footer").addClass("a-fadeinB"); $(".footer").css("display","block"); },150); } if(RebekahTop<winHeight-100){ setTimeout(function(){ $(".Rebekah").addClass("a-fadein"); $(".Rebekah").css("display","block"); },150); } if(RichardTop<winHeight-100){ setTimeout(function(){ $(".Richard").addClass("a-fadein"); $(".Richard").css("display","block"); },150); } if(JoyceTop<winHeight-100){ setTimeout(function(){ $(".Joyce").addClass("a-fadein"); $(".Joyce").css("display","block"); },150); } if(BobTop<winHeight-100){ setTimeout(function(){ $(".Bob").addClass("a-fadein"); $(".Bob").css("display","block"); },150); } if(CarolTop<winHeight-100){ setTimeout(function(){ $(".Carol").addClass("a-fadein"); $(".Carol").css("display","block"); },150); } if(LindaTop<winHeight-100){ setTimeout(function(){ $(".Linda").addClass("a-fadein"); $(".Linda").css("display","block"); },150); } if(YolandaTop<winHeight-100){ setTimeout(function(){ $(".Yolanda").addClass("a-fadein"); $(".Yolanda").css("display","block"); },150); } if(JasmineTop<winHeight-100){ setTimeout(function(){ $(".Jasmine").addClass("a-fadein"); $(".Jasmine").css("display","block"); },150); } if(VivianTop<winHeight-100){ setTimeout(function(){ $(".Vivian").addClass("a-fadein"); $(".Vivian").css("display","block"); },150); } if(LuckyTop<winHeight-100){ setTimeout(function(){ $(".Lucky").addClass("a-fadein"); $(".Lucky").css("display","block"); },150); } if(KennyTop<winHeight-100){ setTimeout(function(){ $(".Kenny").addClass("a-fadein"); $(".Kenny").css("display","block"); },150); } if(Ying_PengTop<winHeight-100){ setTimeout(function(){ $(".Ying_Peng").addClass("a-fadein"); $(".Ying_Peng").css("display","block"); },150); } if(Jianglin_YuTop<winHeight-100){ setTimeout(function(){ $(".Jianglin_Yu").addClass("a-fadein"); $(".Jianglin_Yu").css("display","block"); },150); } if(Shuqiao_YuTop<winHeight-100){ setTimeout(function(){ $(".Shuqiao_Yu").addClass("a-fadein"); $(".Shuqiao_Yu").css("display","block"); },150); } if(Zhaoying_GuanTop<winHeight-100){ setTimeout(function(){ $(".Zhaoying_Guan").addClass("a-fadein"); $(".Zhaoying_Guan").css("display","block"); },150); } }); });