Template:CSS/UT-Tokyo/Counter/Contents
From 2014.igem.org
(Difference between revisions)
Pineappler (Talk | contribs) |
Pineappler (Talk | contribs) |
||
Line 544: | Line 544: | ||
}else{ | }else{ | ||
var str = cont; | var str = cont; | ||
+ | } | ||
+ | |||
+ | var node = document.getElementById(str); | ||
+ | |||
+ | var read = "#" + str; | ||
+ | var loC = "https://2014.igem.org/Team:UT-Tokyo/Counter/Project/" + str.replace("-block","") + "?action=raw"; | ||
+ | var existCheck = node.getElementsByTagName("div"); | ||
+ | if(existCheck.length == 0){ | ||
+ | $(read).load(loC,function(data){ | ||
+ | if(data == null){ | ||
+ | $(read).append("読み込みに失敗しました"); | ||
+ | } | ||
+ | }); | ||
} | } | ||
var box = document.getElementsByClassName("pageContentsBox"); | var box = document.getElementsByClassName("pageContentsBox"); | ||
var pc = document.getElementById("pageContents"); | var pc = document.getElementById("pageContents"); | ||
+ | |||
if(str == "Project-block"){ | if(str == "Project-block"){ | ||
box[0].style.height = "12300px"; | box[0].style.height = "12300px"; | ||
Line 565: | Line 579: | ||
} | } | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
loading.style.display = "none"; | loading.style.display = "none"; | ||
node.style.display = "block"; | node.style.display = "block"; |