YuhangYang (Talk | contribs) |
YuhangYang (Talk | contribs) |
||
Line 22: | Line 22: | ||
$(".Csubtitle span").each(function(index){ | $(".Csubtitle span").each(function(index){ | ||
− | |||
$(this).click(function(){ | $(this).click(function(){ | ||
$(this).parent().siblings(".Csubtitle").find("span").removeClass("active"); | $(this).parent().siblings(".Csubtitle").find("span").removeClass("active"); |
Revision as of 01:03, 17 October 2018
$(function(){
$(document).attr("title","Deign - 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(1).addClass("active"); $(".sub_nav li.Project a").eq(1).addClass("active");
$(".page_nav ul li").removeClass("active"); $(".page_nav ul li").eq(1).addClass("active");
if(window.location.search==""){ $(".page_title").text("Deign"); }else{ $(".page_title").text("设计"); }
$(".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<6){ $(this).parent().siblings(".info").children("div").eq(index).css("display","block");
}else if(index<11){ $(this).parent().siblings(".info").children("div").eq(index-6).css("display","block"); }else{ $(this).parent().siblings(".info").children("div").eq(index-11).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; } });
});
});