Template:CSS/UT-Tokyo/Counter/Contents

From 2014.igem.org

(Difference between revisions)
Line 547: Line 547:
var href = "#" + getUrlVars()["cont"];
var href = "#" + getUrlVars()["cont"];
var target = $(href);
var target = $(href);
-
$("#contentsBody").mCustomScrollbar("scrollTo",target);
+
if(target.style.display != "none"){
 +
$("#contentsBody").mCustomScrollbar("scrollTo",target);
 +
}else{
 +
$("#contentsBody").mCustomScrollbar("scrollTo","top");
 +
}
}else{
}else{
$("#contentsBody").mCustomScrollbar("scrollTo","top");
$("#contentsBody").mCustomScrollbar("scrollTo","top");

Revision as of 07:03, 12 October 2014