Template:CSS/UT-Tokyo/Counter/Contents
From 2014.igem.org
(Difference between revisions)
Pineappler (Talk | contribs) |
Pineappler (Talk | contribs) |
||
Line 594: | Line 594: | ||
if(hoge == 1){ | if(hoge == 1){ | ||
clearInterval(huga); | clearInterval(huga); | ||
- | + | if(typeof link !== "undefined"){ | |
- | + | if(link == "top"){ | |
- | + | $("#contentsBody").mCustomScrollbar("scrollTo","top"); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
}else{ | }else{ | ||
- | if(typeof getUrlVars()["cont"] !== "undefined"){ | + | 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"); | ||
} | } | ||
} | } | ||
} | } | ||
- | }, | + | },1000); |
var team = document.getElementById("Team-top"); | var team = document.getElementById("Team-top"); | ||
if(team.style.display != "none"){ | if(team.style.display != "none"){ |