Template:CSS/UT-Tokyo/Counter/Contents

From 2014.igem.org

(Difference between revisions)
Line 496: Line 496:
function loadContent(cont,link){
function loadContent(cont,link){
document.title = "σ-Re Counter | UT-Tokyo 2014";
document.title = "σ-Re Counter | UT-Tokyo 2014";
 +
 +
$("#contentsBody").mCustomScrollbar({
 +
mouseWheelPixels: 250
 +
});
 +
var node = document.getElementById("pageContents");
 +
for(var i = 0;i < node.childNodes.length; i++){
 +
if(node.childNodes[i].nodeType == 1){
 +
node.childNodes[i].style.display = "none";
 +
}
 +
}
 +
 +
var loading = document.getElementById("loading-img");
 +
loading.style.display = "block";
 +
if(typeof cont !== "undefined"){
if(typeof cont !== "undefined"){
if(cont != "Team-top"){
if(cont != "Team-top"){
Line 521: Line 535:
}
}
}
}
-
}
 
-
}
 
-
var node = document.getElementById("pageContents");
 
-
for(var i = 0;i < node.childNodes.length; i++){
 
-
if(node.childNodes[i].nodeType == 1){
 
-
node.childNodes[i].style.display = "none";
 
}
}
}
}
Line 560: Line 568:
}
}
var node = document.getElementById(str);
var node = document.getElementById(str);
 +
loading.style.display = "none";
node.style.display = "block";
node.style.display = "block";
Line 680: Line 689:
<link href="https://2014.igem.org/Team:UT-Tokyo/jquery.mCustomScrollbar.css?action=raw&ctype=text/css" rel="stylesheet" type="text/css">
<link href="https://2014.igem.org/Team:UT-Tokyo/jquery.mCustomScrollbar.css?action=raw&ctype=text/css" rel="stylesheet" type="text/css">
<script>
<script>
-
$(window).load(function() {
 
-
$("#contentsBody").mCustomScrollbar({
 
-
mouseWheelPixels: 250
 
-
});
 
-
});
 
$(window).load( function() {
$(window).load( function() {
    
    

Revision as of 06:09, 16 October 2014