Template:CSS/UT-Tokyo/Counter

From 2014.igem.org

(Difference between revisions)
Line 56: Line 56:
function setMouseOver(){
function setMouseOver(){
document.title = "σ-Re Counter | UT-Tokyo 2014";
document.title = "σ-Re Counter | UT-Tokyo 2014";
-
var node = document.getElementById("jMenu");
 
-
for(var i = 0;i<node.childNodes.length;i++){
 
-
if(node.childNodes[i].nodeType == 1){
 
-
node.childNodes[i].onmouseover = function(){
 
-
img = this.getElementsByTagName('img');
 
-
if(img[0]){
 
-
var tmp = img[0].src;
 
-
img[0].src = img[0].alt;
 
-
img[0].alt = tmp;
 
-
}
 
-
}
 
-
node.childNodes[i].onmouseout = function(){
 
-
img = this.getElementsByTagName('img');
 
-
if(img[0]){
 
-
var tmp = img[0].src;
 
-
img[0].src = img[0].alt;
 
-
img[0].alt = tmp;
 
-
}
 
-
}
 
-
}
 
-
}
 
-
var node = document.getElementById("jMenu2");
 
-
for(var i = 0;i<node.childNodes.length;i++){
 
-
if(node.childNodes[i].nodeType == 1){
 
-
node.childNodes[i].onmouseover = function(){
 
-
img = this.getElementsByTagName('img');
 
-
if(img[0]){
 
-
var tmp = img[0].src;
 
-
img[0].src = img[0].alt;
 
-
img[0].alt = tmp;
 
-
}
 
-
}
 
-
node.childNodes[i].onmouseout = function(){
 
-
img = this.getElementsByTagName('img');
 
-
if(img[0]){
 
-
var tmp = img[0].src;
 
-
img[0].src = img[0].alt;
 
-
img[0].alt = tmp;
 
-
}
 
-
}
 
-
}
 
-
}
 
}
}
</script>
</script>

Revision as of 01:26, 18 October 2014