Template:CSS/UT-Tokyo/CTCD/Contents
From 2014.igem.org
(Difference between revisions)
Pineappler (Talk | contribs) |
Pineappler (Talk | contribs) |
||
Line 672: | Line 672: | ||
} | } | ||
}else{ | }else{ | ||
- | if(typeof getUrlVars()[" | + | if(typeof getUrlVars()["contents"] !== "undefined"){ |
- | var href = "#" + getUrlVars()[" | + | if(document.getElementById(getUrlVars()["contents"]) != null){ |
- | + | var href = "#" + getUrlVars()["contents"]; | |
- | + | var target = $(href); | |
- | + | $("#contentsBody").mCustomScrollbar("scrollTo",target); | |
- | }else | + | clearInterval(huga); |
+ | } | ||
+ | }else{ | ||
$("#contentsBody").mCustomScrollbar("scrollTo","top"); | $("#contentsBody").mCustomScrollbar("scrollTo","top"); | ||
clearInterval(huga); | clearInterval(huga); |
Revision as of 18:16, 17 October 2014