YuhangYang (Talk | contribs) |
YuhangYang (Talk | contribs) (final) |
||
Line 2: | Line 2: | ||
$(document).attr("title","Team - Team:SSTi-SZGD - 2018.igem.org"); | $(document).attr("title","Team - Team:SSTi-SZGD - 2018.igem.org"); | ||
+ | |||
+ | //add transition | ||
+ | $(".page_content").addClass("transition"); | ||
+ | $(".page_content").find("*").addClass("transition"); | ||
//Navigation | //Navigation | ||
$(".btn_nav .Acknowledgements a").eq(0).addClass("active"); | $(".btn_nav .Acknowledgements a").eq(0).addClass("active"); | ||
$(".sub_nav li.Acknowledgements a").eq(0).addClass("active"); | $(".sub_nav li.Acknowledgements a").eq(0).addClass("active"); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
$(".page_nav ul li").removeClass("active"); | $(".page_nav ul li").removeClass("active"); | ||
Line 24: | Line 19: | ||
$(".page_title").text("团队"); | $(".page_title").text("团队"); | ||
} | } | ||
+ | |||
+ | if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){ | ||
+ | |||
+ | //Banner | ||
+ | if($(window).width()<768){ | ||
+ | $(".Banner").css({"height":"300px","background-size":"85%","margin":"50px 0 0 0"}); | ||
+ | }else{ | ||
+ | $(".Banner").css({"height":"600px","background-size":"70%","margin":"100px 0 0 0"}); | ||
+ | } | ||
+ | |||
+ | if(window.orientation=="-90"||window.orientation=="90"){ | ||
+ | if($(window).height()>=330){ | ||
+ | $(".Banner").css({"margin-top":"100px"}); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | $(window).resize(function(){ | ||
+ | |||
+ | if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){ | ||
+ | if($(window).width()<768){ | ||
+ | $(".Banner").css({"height":"300px","background-size":"85%","margin":"50px 0 0 0"}); | ||
+ | }else{ | ||
+ | $(".Banner").css({"height":"600px","background-size":"70%","margin":"100px 0 0 0"}); | ||
+ | } | ||
+ | |||
+ | if(window.orientation=="-90"||window.orientation=="90"){ | ||
+ | if($(window).height()>=330){ | ||
+ | $(".Banner").css({"margin-top":"100px"}); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | }); | ||
+ | |||
+ | $(".Members .introduction li .img").hover(function(){ | ||
+ | $(this).find("img:nth-of-type(1)").css("display","none"); | ||
+ | $(this).find("img:nth-of-type(2)").css("display","block"); | ||
+ | },function(){ | ||
+ | $(this).find("img:nth-of-type(1)").css("display","block"); | ||
+ | $(this).find("img:nth-of-type(2)").css("display","none"); | ||
+ | }); | ||
+ | |||
}); | }); |
Latest revision as of 00:24, 5 November 2018
$(function(){
$(document).attr("title","Team - Team:SSTi-SZGD - 2018.igem.org");
//add transition $(".page_content").addClass("transition"); $(".page_content").find("*").addClass("transition");
//Navigation $(".btn_nav .Acknowledgements a").eq(0).addClass("active"); $(".sub_nav li.Acknowledgements a").eq(0).addClass("active");
$(".page_nav ul li").removeClass("active"); $(".page_nav ul li").eq(5).addClass("active");
if(window.location.search==""){ $(".page_title").text("Team"); }else{ $(".page_title").text("团队"); }
if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){
//Banner if($(window).width()<768){ $(".Banner").css({"height":"300px","background-size":"85%","margin":"50px 0 0 0"}); }else{ $(".Banner").css({"height":"600px","background-size":"70%","margin":"100px 0 0 0"}); }
if(window.orientation=="-90"||window.orientation=="90"){ if($(window).height()>=330){ $(".Banner").css({"margin-top":"100px"}); } } }
$(window).resize(function(){
if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){ if($(window).width()<768){ $(".Banner").css({"height":"300px","background-size":"85%","margin":"50px 0 0 0"}); }else{ $(".Banner").css({"height":"600px","background-size":"70%","margin":"100px 0 0 0"}); }
if(window.orientation=="-90"||window.orientation=="90"){ if($(window).height()>=330){ $(".Banner").css({"margin-top":"100px"}); } } }
});
$(".Members .introduction li .img").hover(function(){ $(this).find("img:nth-of-type(1)").css("display","none"); $(this).find("img:nth-of-type(2)").css("display","block"); },function(){ $(this).find("img:nth-of-type(1)").css("display","block"); $(this).find("img:nth-of-type(2)").css("display","none"); });
});