Template:CSS/UT-Tokyo/Counter/Contents
From 2014.igem.org
(Difference between revisions)
Pineappler (Talk | contribs) |
Pineappler (Talk | contribs) |
||
Line 565: | Line 565: | ||
} | } | ||
- | + | 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){ | if(data == null){ | ||
$(read).append("読み込みに失敗しました"); | $(read).append("読み込みに失敗しました"); | ||
Line 573: | Line 577: | ||
}); | }); | ||
} | } | ||
- | |||
- | |||
loading.style.display = "none"; | loading.style.display = "none"; | ||
node.style.display = "block"; | node.style.display = "block"; |