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

(Created page with "延时加载: $(function(){ var winHeight=$(window).height(); var Project_IntroductionTop=$(".Content").offset().top-$(window).scrollTop(); var footerTop=$(".footer_box"...")
 
Line 12: Line 12:
 
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 28: Line 28:
 
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:26, 31 July 2017

/*延时加载*/ $(function(){ var winHeight=$(window).height(); var Project_IntroductionTop=$(".Content").offset().top-$(window).scrollTop(); var footerTop=$(".footer_box").offset().top-$(window).scrollTop(); if(Project_IntroductionTop<winHeight-100){ setTimeout(function(){ $(".Project_Introduction").addClass("a-bouncein"); $(".Project_Introduction").css("display","block"); },150); } if(footerTop<winHeight-100){ setTimeout(function(){ $(".footer").addClass("a-fadeinB"); $(".footer").css("display","block"); },150); } $(window).scroll(function(){ winHeight=$(window).height(); Project_IntroductionTop=$(".Content").offset().top-$(window).scrollTop(); footerTop=$(".footer_box").offset().top-$(window).scrollTop(); if(Project_IntroductionTop<winHeight-100){ setTimeout(function(){ $(".Project_Introduction").addClass("a-bouncein"); $(".Project_Introduction").css("display","block"); },150); } if(footerTop<winHeight-100){ setTimeout(function(){ $(".footer").addClass("a-fadeinB"); $(".footer").css("display","block"); },150); } }); });