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

Line 1: Line 1:
/*自定义Project效果*/
+
/*custom Project Effect*/
 
$(function(){
 
$(function(){
 
$(".header .nav .mainnav").eq(2).hover(function(){
 
$(".header .nav .mainnav").eq(2).hover(function(){
Line 8: Line 8:
 
});
 
});
  
/*延时加载*/
+
/*Lazy loading*/
 
$(function(){
 
$(function(){
 
 

Revision as of 12:12, 24 September 2017

/*custom Project Effect*/ $(function(){ $(".header .nav .mainnav").eq(2).hover(function(){ $(".header .nav .Project span").css("color","#FAEE0D"); },function(){ $(".header .nav .Project span").css("color","#FAEE0D"); }); });

/*Lazy loading*/ $(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); }

});

});