Template:CSS/UT-Tokyo/CTCD

From 2014.igem.org

(Difference between revisions)
 
Line 56: Line 56:
function setMouseOver(){
function setMouseOver(){
document.title = "CTCD | UT-Tokyo 2014";
document.title = "CTCD | 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>

Latest revision as of 02:38, 18 October 2014