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

Line 1: Line 1:
 +
/*自定义Team效果*/
 +
$(function(){
 +
$(".header .nav .mainnav").eq(2).hover(function(){
 +
$(".header .nav .Project span").css("color","#FAEE0D");
 +
},function(){
 +
$(".header .nav .Project span").css("color","#FAEE0D");
 +
});
 +
});
 +
 
/*延时加载*/
 
/*延时加载*/
 
$(function(){
 
$(function(){
 +
 
var winHeight=$(window).height();
 
var winHeight=$(window).height();
 
var Project_IntroductionTop=$(".Content").offset().top-$(window).scrollTop();
 
var Project_IntroductionTop=$(".Content").offset().top-$(window).scrollTop();
var footerTop=$(".footer_box").offset().top-$(window).scrollTop();
+
 
if(Project_IntroductionTop<winHeight-100){
 
if(Project_IntroductionTop<winHeight-100){
 
setTimeout(function(){
 
setTimeout(function(){
Line 10: Line 20:
 
},150);
 
},150);
 
}
 
}
if(footerTop<winHeight-100){
+
setTimeout(function(){
+
$(".footer").addClass("a-fadeinB");
+
$(".footer").css("display","block");
+
},150);
+
}
+
 
$(window).scroll(function(){
 
$(window).scroll(function(){
 +
 
winHeight=$(window).height();
 
winHeight=$(window).height();
 
Project_IntroductionTop=$(".Content").offset().top-$(window).scrollTop();
 
Project_IntroductionTop=$(".Content").offset().top-$(window).scrollTop();
footerTop=$(".footer_box").offset().top-$(window).scrollTop();
+
 
if(Project_IntroductionTop<winHeight-100){
 
if(Project_IntroductionTop<winHeight-100){
 
setTimeout(function(){
 
setTimeout(function(){
Line 26: Line 32:
 
},150);
 
},150);
 
}
 
}
if(footerTop<winHeight-100){
+
setTimeout(function(){
+
$(".footer").addClass("a-fadeinB");
+
$(".footer").css("display","block");
+
},150);
+
}
+
 
});
 
});
 +
 
});
 
});

Revision as of 02:34, 1 August 2017

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

/*延时加载*/ $(function(){

var winHeight=$(window).height(); var Project_IntroductionTop=$(".Content").offset().top-$(window).scrollTop();

if(Project_IntroductionTop<winHeight-100){ setTimeout(function(){ $(".Project_Introduction").addClass("a-bouncein"); $(".Project_Introduction").css("display","block"); },150); }

$(window).scroll(function(){

winHeight=$(window).height(); Project_IntroductionTop=$(".Content").offset().top-$(window).scrollTop();

if(Project_IntroductionTop<winHeight-100){ setTimeout(function(){ $(".Project_Introduction").addClass("a-bouncein"); $(".Project_Introduction").css("display","block"); },150); }

});

});