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

(modify title)
m
Line 4: Line 4:
 
 
 
//Navigation
 
//Navigation
$(".btn_nav .Team a").eq(0).addClass("active");
+
$(".btn_nav .Acknowledgements a").eq(0).addClass("active");
 
 
$(".Members ul").masonry({
+
itemSelector: '.item',
+
$(".Members .introduction li .img").hover(function(){
gutterWidth: 5
+
$(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");
 
});
 
});
 +
 +
 +
if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){
 +
if($(window).height()>=600){
 +
$(".Content").css("height","auto");
 +
}
 +
}else if($(window).height()>=600){
 +
$(".Content").height($(window).height());
 +
}else {
 +
$(".Content").css("height","auto");
 +
}
 
 
$(".Members ul li").addClass("hvr-radial-in");
+
$(window).resize(function(){
 +
 +
if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){
 +
if($(window).height()>=600){
 +
$(".Content").css("height","auto");
 +
}
 +
}else if($(window).height()>=600){
 +
$(".Content").height($(window).height());
 +
}else {
 +
$(".Content").css("height","auto");
 +
}
 +
 +
});
 
 
$(".Members ul").children().css("transition","none");
 
 
 
 
$(".page_nav ul li").removeClass("active");
 
$(".page_nav ul li").removeClass("active");

Revision as of 13:06, 2 October 2018

$(function(){

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

//Navigation $(".btn_nav .Acknowledgements a").eq(0).addClass("active");


$(".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"); });


if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){ if($(window).height()>=600){ $(".Content").css("height","auto"); } }else if($(window).height()>=600){ $(".Content").height($(window).height()); }else { $(".Content").css("height","auto"); }

$(window).resize(function(){

if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){ if($(window).height()>=600){ $(".Content").css("height","auto"); } }else if($(window).height()>=600){ $(".Content").height($(window).height()); }else { $(".Content").css("height","auto"); }

});


$(".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("团队"); }

});