Template:CSS/UT-Tokyo/CTCD/Contents

From 2014.igem.org

(Difference between revisions)
Line 672: Line 672:
}
}
}else{
}else{
-
if(typeof getUrlVars()["cont"] !== "undefined"){
+
if(typeof getUrlVars()["contents"] !== "undefined"){
-
var href = "#" + getUrlVars()["cont"];
+
if(document.getElementById(getUrlVars()["contents"]) != null){
-
var target = $(href);
+
var href = "#" + getUrlVars()["contents"];
-
$("#contentsBody").mCustomScrollbar("scrollTo",target);
+
var target = $(href);
-
clearInterval(huga);
+
$("#contentsBody").mCustomScrollbar("scrollTo",target);
-
}else if(document.getElementById(link) != null){
+
clearInterval(huga);
 +
}
 +
}else{
$("#contentsBody").mCustomScrollbar("scrollTo","top");
$("#contentsBody").mCustomScrollbar("scrollTo","top");
clearInterval(huga);
clearInterval(huga);

Revision as of 18:16, 17 October 2014