YuhangYang (Talk | contribs) |
YuhangYang (Talk | contribs) (final) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
$(document).attr("title","Notebook - Team:SSTi-SZGD - 2018.igem.org"); | $(document).attr("title","Notebook - Team:SSTi-SZGD - 2018.igem.org"); | ||
+ | |||
+ | //add transition | ||
+ | $(".page_content").addClass("transition"); | ||
+ | $(".page_content").find("*").addClass("transition"); | ||
+ | $(".Content .content").removeClass("transition"); | ||
//Navigation | //Navigation |
Latest revision as of 17:07, 4 November 2018
$(function(){
$(document).attr("title","Notebook - Team:SSTi-SZGD - 2018.igem.org");
//add transition $(".page_content").addClass("transition"); $(".page_content").find("*").addClass("transition"); $(".Content .content").removeClass("transition");
//Navigation $(".btn_nav .Project a").eq(6).addClass("active"); $(".sub_nav li.Project a").eq(6).addClass("active");
$(".page_nav ul li").removeClass("active"); $(".page_nav ul li").eq(1).addClass("active");
if(window.location.search==""){ $(".page_title").text("Notebook"); }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":"250px","background-size":"80%","margin":"50px 0 0 0"}); }else{ $(".Banner").css({"height":"500px","background-size":"70%","margin":"100px 0 0 0"}); } if(window.orientation=="-90"||window.orientation=="90"){ if($(window).width()<768){ $(".Banner").css({"height":"500px","background-size":"80%","margin":"50px 0 0 0"}); }else{ $(".Banner").css({"height":"500px","background-size":"60%","margin":"100px 0 0 0"}); } }
}
$(window).resize(function(){
if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){
//Banner if($(window).width()<768){ $(".Banner").css({"height":"250px","background-size":"80%","margin":"50px 0 0 0"}); }else{ $(".Banner").css({"height":"500px","background-size":"70%","margin":"100px 0 0 0"}); } if(window.orientation=="-90"||window.orientation=="90"){ if($(window).width()<768){ $(".Banner").css({"height":"500px","background-size":"80%","margin":"50px 0 0 0"}); }else{ $(".Banner").css({"height":"500px","background-size":"60%","margin":"100px 0 0 0"}); } } }
});
$(".Content .title").each(function(){
var control=0; $(this).click(function(){
if(control==0){ $(this).next().slideDown(); control=1; }else{ $(this).next().slideUp(); control=0; } });
});
});