Template:CSS/UT-Tokyo/Counter/Contents

From 2014.igem.org

(Difference between revisions)
Line 547: Line 547:
var node = document.getElementById(str);
var node = document.getElementById(str);
 +
 +
var hoge = 0;
var read = "#" + str;
var read = "#" + str;
Line 555: Line 557:
if(data == null){
if(data == null){
$(read).append("読み込みに失敗しました");
$(read).append("読み込みに失敗しました");
 +
hoge = 1;
 +
}else{
 +
hoge = 1;
}
}
});
});
Line 586: Line 591:
btnode.style.display = "block";
btnode.style.display = "block";
}
}
-
if(typeof link !== "undefined"){
+
var huga = setInterval(function(){
-
if(link == "top"){
+
if(hoge == 1){
-
$("#contentsBody").mCustomScrollbar("scrollTo","top");
+
if(typeof link !== "undefined"){
-
}else{
+
if(link == "top"){
-
var href = "#" + link;
+
$("#contentsBody").mCustomScrollbar("scrollTo","top");
-
var target = $(href);
+
}else{
-
$("#contentsBody").mCustomScrollbar("scrollTo",target);
+
var href = "#" + link;
 +
var target = $(href);
 +
$("#contentsBody").mCustomScrollbar("scrollTo",target);
 +
}
 +
}else{
 +
if(typeof getUrlVars()["cont"] !== "undefined"){
 +
var href = "#" + getUrlVars()["cont"];
 +
var target = $(href);
 +
$("#contentsBody").mCustomScrollbar("scrollTo",target);
 +
}else{
 +
$("#contentsBody").mCustomScrollbar("scrollTo","top");
 +
}
 +
}
 +
clearInterval(hoge);
}
}
-
}else{
+
},500);
-
if(typeof getUrlVars()["cont"] !== "undefined"){
+
-
var href = "#" + getUrlVars()["cont"];
+
-
var target = $(href);
+
-
$("#contentsBody").mCustomScrollbar("scrollTo",target);
+
-
}else{
+
-
$("#contentsBody").mCustomScrollbar("scrollTo","top");
+
-
}
+
-
}
+
var team = document.getElementById("Team-top");
var team = document.getElementById("Team-top");
if(team.style.display != "none"){
if(team.style.display != "none"){

Revision as of 07:39, 16 October 2014