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

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

Revision as of 12:19, 25 September 2017

/*custom Project Effect*/ $(function(){ $(".header .nav .mainnav").eq(1).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); }

});

});