YuhangYang (Talk | contribs) |
YuhangYang (Talk | contribs) |
||
Line 8: | Line 8: | ||
}); | }); | ||
+ | }); | ||
+ | |||
+ | /*Follow the height of the window size*/ | ||
+ | $(function(){ | ||
+ | |||
+ | var winHeight=$(window).outerHeight(); | ||
+ | if(winHeight>=489){ | ||
+ | $(".SSTi-SZGD").css("height",winHeight); | ||
+ | } | ||
+ | else{ | ||
+ | $(".SSTi-SZGD").css("height","489px"); | ||
+ | } | ||
+ | |||
+ | $(window).resize(function(){ | ||
+ | |||
+ | winHeight=$(window).outerHeight(); | ||
+ | if(winHeight>=489){ | ||
+ | $(".SSTi-SZGD").css("height",winHeight); | ||
+ | }else{ | ||
+ | $(".SSTi-SZGD").css("height","489px"); | ||
+ | } | ||
+ | |||
+ | }); | ||
+ | |||
}); | }); | ||
Line 37: | Line 61: | ||
$(".LOS .igem").css("display","none") | $(".LOS .igem").css("display","none") | ||
},400); | },400); | ||
+ | }else if($(this).parent().attr("class")=="Transformation"){ | ||
+ | setTimeout(function(){ | ||
+ | $(".Transformation .igem").css("display","none") | ||
+ | },270); | ||
+ | }else if($(this).parent().attr("class")=="Colony"){ | ||
+ | setTimeout(function(){ | ||
+ | $(".Colony .igem").css("display","none") | ||
+ | },350); | ||
+ | }else if($(this).parent().attr("class")=="Bio"){ | ||
+ | setTimeout(function(){ | ||
+ | $(".Bio .igem").css("display","none") | ||
+ | },300); | ||
+ | }else if($(this).parent().attr("class")=="Light"){ | ||
+ | setTimeout(function(){ | ||
+ | $(".Light .igem").css("display","none") | ||
+ | },300); | ||
+ | }else if($(this).parent().attr("class")=="EAD"){ | ||
+ | setTimeout(function(){ | ||
+ | $(".EAD .igem").css("display","none") | ||
+ | },230); | ||
+ | }else if($(this).parent().attr("class")=="EAS"){ | ||
+ | setTimeout(function(){ | ||
+ | $(".EAS .igem").css("display","none") | ||
+ | },230); | ||
+ | }else if($(this).parent().attr("class")=="HPLC"){ | ||
+ | setTimeout(function(){ | ||
+ | $(".HPLC .igem").css("display","none") | ||
+ | },300); | ||
} | } | ||
} | } |
Latest revision as of 04:43, 30 October 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"); });
});
/*Follow the height of the window size*/ $(function(){
var winHeight=$(window).outerHeight(); if(winHeight>=489){ $(".SSTi-SZGD").css("height",winHeight); } else{ $(".SSTi-SZGD").css("height","489px"); }
$(window).resize(function(){
winHeight=$(window).outerHeight(); if(winHeight>=489){ $(".SSTi-SZGD").css("height",winHeight); }else{ $(".SSTi-SZGD").css("height","489px"); }
});
});
/*Telescopic*/ $(function(){
$(".Title").click(function(){
if($(this).next().css("display")=="none"){ $(this).children(".plus").css("display","none"); $(this).children(".reduce").css("display","block"); $(this).next().slideDown(); $(this).children(".igem").css("display","block") }else{ $(this).next().slideUp(); $(this).children(".reduce").css("display","none"); $(this).children(".plus").css("display","block"); if($(this).parent().attr("class")=="MPD"){ setTimeout(function(){ $(".MPD .igem").css("display","none") },400); }else if($(this).parent().attr("class")=="MHEI"){ setTimeout(function(){ $(".MHEI .igem").css("display","none") },400); } else if($(this).parent().attr("class")=="LOS"){ setTimeout(function(){ $(".LOS .igem").css("display","none") },400); }else if($(this).parent().attr("class")=="Transformation"){ setTimeout(function(){ $(".Transformation .igem").css("display","none") },270); }else if($(this).parent().attr("class")=="Colony"){ setTimeout(function(){ $(".Colony .igem").css("display","none") },350); }else if($(this).parent().attr("class")=="Bio"){ setTimeout(function(){ $(".Bio .igem").css("display","none") },300); }else if($(this).parent().attr("class")=="Light"){ setTimeout(function(){ $(".Light .igem").css("display","none") },300); }else if($(this).parent().attr("class")=="EAD"){ setTimeout(function(){ $(".EAD .igem").css("display","none") },230); }else if($(this).parent().attr("class")=="EAS"){ setTimeout(function(){ $(".EAS .igem").css("display","none") },230); }else if($(this).parent().attr("class")=="HPLC"){ setTimeout(function(){ $(".HPLC .igem").css("display","none") },300); } }
});
});