Liupengxin (Talk | contribs) (Created page with "$(function(){ $(document).attr("title","Results - Team:SSTi-SZGD - 2018.igem.org"); //transition $(".page_content").addClass("transition"); $(".page_content").find("*"...") |
YuhangYang (Talk | contribs) (final) |
||
Line 20: | Line 20: | ||
$(".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"}); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | }); | ||
+ | |||
$(".Csubtitle span").each(function(index){ | $(".Csubtitle span").each(function(index){ |
Latest revision as of 13:08, 6 November 2018
$(function(){
$(document).attr("title","Results - Team:SSTi-SZGD - 2018.igem.org");
//transition $(".page_content").addClass("transition"); $(".page_content").find("*").addClass("transition"); $(".Content .content").removeClass("transition");
//Navigation $(".btn_nav .Project a").eq(2).addClass("active"); $(".sub_nav li.Project a").eq(2).addClass("active");
$(".page_nav ul li").removeClass("active"); $(".page_nav ul li").eq(1).addClass("active");
if(window.location.search==""){ $(".page_title").text("Results"); }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"}); } }
}
});
$(".Csubtitle span").each(function(index){
$(this).click(function(){
$(this).parent().siblings(".Csubtitle").find("span").removeClass("active");
$(this).addClass("active");
$(this).parent().siblings(".info").children("div").css("display","none");
if(index<3){
$(this).parent().siblings(".info").children("div").eq(index).css("display","block");
}else if(index<8){ $(this).parent().siblings(".info").children("div").eq(index-3).css("display","block"); }else{ $(this).parent().siblings(".info").children("div").eq(index-8).css("display","block"); } }); });
$(".Content .title").each(function(){
var control=0; $(this).click(function(){ if(control==0){ $(this).next().slideDown(); control=1; }else{ $(this).next().slideUp(); control=0; } });
});
});