Template:CSS/UT-Tokyo/Counter/Contents

From 2014.igem.org

(Difference between revisions)
Line 594: Line 594:
if(hoge == 1){
if(hoge == 1){
clearInterval(huga);
clearInterval(huga);
-
$(window).load(function(){
+
window.onload = function(){
-
if(typeof link !== "undefined"){
+
if(typeof link !== "undefined"){
-
if(link == "top"){
+
if(link == "top"){
-
$("#contentsBody").mCustomScrollbar("scrollTo","top");
+
$("#contentsBody").mCustomScrollbar("scrollTo","top");
 +
}else{
 +
var href = "#" + link;
 +
var target = $(href);
 +
$("#contentsBody").mCustomScrollbar("scrollTo",target);
 +
}
}else{
}else{
-
var href = "#" + link;
+
if(typeof getUrlVars()["cont"] !== "undefined"){
-
var target = $(href);
+
var href = "#" + getUrlVars()["cont"];
-
$("#contentsBody").mCustomScrollbar("scrollTo",target);
+
var target = $(href);
-
}
+
$("#contentsBody").mCustomScrollbar("scrollTo",target);
-
}else{
+
}else{
-
if(typeof getUrlVars()["cont"] !== "undefined"){
+
$("#contentsBody").mCustomScrollbar("scrollTo","top");
-
var href = "#" + getUrlVars()["cont"];
+
}
-
var target = $(href);
+
-
$("#contentsBody").mCustomScrollbar("scrollTo",target);
+
-
}else{
+
-
$("#contentsBody").mCustomScrollbar("scrollTo","top");
+
}
}
}
}
-
});
 
}
}
},500);
},500);

Revision as of 09:55, 16 October 2014