Line 11: | Line 11: | ||
//x = e.pageX, y = e.pageY; | //x = e.pageX, y = e.pageY; | ||
+ | |||
+ | var offset1 = document.getElementById("team").offsetLeft; | ||
+ | var offset2 = document.getElementById("team").offsetTop; | ||
+ | |||
+ | var x=e.clientX - offset1; | ||
+ | var y=e.clientY - offset2; | ||
− | if( | + | if(x>=25) |
− | if( | + | if(x<=84) |
− | if( | + | if(y>=225) |
− | if( | + | if(y<=320) |
document.getElementById("myNav1").style.width = "100%"; | document.getElementById("myNav1").style.width = "100%"; | ||
− | if( | + | if(x>=253) |
− | if( | + | if(x<=320) |
− | if( | + | if(y>=117) |
− | if( | + | if(y<=205) |
document.getElementById("myNav2").style.width = "100%"; | document.getElementById("myNav2").style.width = "100%"; | ||
− | if( | + | if(x>=325) |
− | if( | + | if(x<=390) |
− | if( | + | if(y>=224) |
− | if( | + | if(y<=298) |
document.getElementById("myNav3").style.width = "100%"; | document.getElementById("myNav3").style.width = "100%"; | ||
− | if( | + | if(x>=603) |
− | if( | + | if(x<=683) |
− | if( | + | if(y>=173) |
− | if( | + | if(y<=270) |
document.getElementById("myNav4").style.width = "100%"; | document.getElementById("myNav4").style.width = "100%"; | ||
− | if( | + | if(x>=700) |
− | if( | + | if(x<=774) |
− | if( | + | if(y>=82) |
− | if( | + | if(y<=170) |
document.getElementById("myNav5").style.width = "100%"; | document.getElementById("myNav5").style.width = "100%"; | ||
− | if( | + | if(x>=941) |
− | if( | + | if(x<=1022) |
− | if( | + | if(y>=162) |
− | if( | + | if(y<=244) |
document.getElementById("myNav6").style.width = "100%"; | document.getElementById("myNav6").style.width = "100%"; | ||
Revision as of 16:41, 1 November 2017