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

(final)
 
Line 2: Line 2:
 
 
 
$(document).attr("title","Integrated Human Practices - Team:SSTi-SZGD - 2018.igem.org");
 
$(document).attr("title","Integrated Human Practices - Team:SSTi-SZGD - 2018.igem.org");
 +
 +
//translation
 +
$(".page_content").addClass("transition");
 +
$(".page_content").find("*").addClass("transition");
 
 
 
//Navigation
 
//Navigation
Line 11: Line 15:
 
 
 
if(window.location.search==""){
 
if(window.location.search==""){
$(".page_title").text("Integrated Human Practices");
+
$(".page_title").text("Practices");
 
}else{
 
}else{
$(".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"});
 +
}
 +
}
 +
 +
}
 +
 +
});
 
 
 
});
 
});

Latest revision as of 00:54, 6 November 2018

$(function(){

$(document).attr("title","Integrated Human Practices - Team:SSTi-SZGD - 2018.igem.org");

//translation $(".page_content").addClass("transition"); $(".page_content").find("*").addClass("transition");

//Navigation $(".btn_nav .Human_Practices a").eq(0).addClass("active"); $(".sub_nav li.Human_Practices a").eq(0).addClass("active");

$(".page_nav ul li").removeClass("active"); $(".page_nav ul li").eq(4).addClass("active");

if(window.location.search==""){ $(".page_title").text("Practices"); }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"}); } }

}

});

});