YuhangYang (Talk | contribs) |
|||
Line 1: | Line 1: | ||
− | /* | + | /*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); }
});
});