Line 6: | Line 6: | ||
function openNav(e) { | function openNav(e) { | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
var offset1 = document.getElementById("team").offsetLeft; | var offset1 = document.getElementById("team").offsetLeft; | ||
var offset2 = document.getElementById("team").offsetTop; | var offset2 = document.getElementById("team").offsetTop; | ||
− | var x=e.pageX; | + | var x=0; //e.pageX; |
− | var y=e.pageY; | + | var y=0; //e.pageY; |
− | if(x>= | + | if (!e) var e = window.event; |
− | if(x<= | + | if (e.pageX || e.pageY) |
− | if(y>= | + | { |
− | if(y<= | + | x = e.pageX; |
+ | y = e.pageY; | ||
+ | } | ||
+ | else if (e.clientX || e.clientY) | ||
+ | { | ||
+ | x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; | ||
+ | y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; | ||
+ | } | ||
+ | |||
+ | if(x>=27) | ||
+ | if(x<=87) | ||
+ | if(y>=149) | ||
+ | if(y<=251) | ||
document.getElementById("myNav1").style.width = "100%"; | document.getElementById("myNav1").style.width = "100%"; | ||
− | if(x>= | + | if(x>=248) |
− | if(x<= | + | if(x<=322) |
− | if(y>= | + | if(y>=41) |
− | if(y<= | + | if(y<=137) |
document.getElementById("myNav2").style.width = "100%"; | document.getElementById("myNav2").style.width = "100%"; | ||
− | if(x>= | + | if(x>=322) |
− | if(x<= | + | if(x<=391) |
− | if(y>= | + | if(y>=147) |
− | if(y<= | + | if(y<=227) |
document.getElementById("myNav3").style.width = "100%"; | document.getElementById("myNav3").style.width = "100%"; | ||
− | if(x>= | + | if(x>=602) |
if(x<=685) | if(x<=685) | ||
− | if(y>= | + | if(y>=99) |
− | if(y<= | + | if(y<=200) |
document.getElementById("myNav4").style.width = "100%"; | document.getElementById("myNav4").style.width = "100%"; | ||
if(x>=699) | if(x>=699) | ||
if(x<=774) | if(x<=774) | ||
− | if(y>= | + | if(y>=8) |
− | if(y<= | + | if(y<=100) |
document.getElementById("myNav5").style.width = "100%"; | document.getElementById("myNav5").style.width = "100%"; | ||
if(x>=935) | if(x>=935) | ||
− | if(x<= | + | if(x<=1024) |
− | if(y>= | + | if(y>=82) |
− | if(y<= | + | if(y<=170) |
document.getElementById("myNav6").style.width = "100%"; | document.getElementById("myNav6").style.width = "100%"; | ||
− | if(x>= | + | if(x>=1052) |
− | if(x<= | + | if(x<=1138) |
− | if(y>= | + | if(y>=15) |
− | if(y<= | + | if(y<=128) |
document.getElementById("myNav7").style.width = "100%"; | document.getElementById("myNav7").style.width = "100%"; | ||
− | if(x>= | + | if(x>=1145) |
if(x<=1220) | if(x<=1220) | ||
− | if(y>= | + | if(y>=102) |
− | if(y<= | + | if(y<=190) |
document.getElementById("myNav8").style.width = "100%"; | document.getElementById("myNav8").style.width = "100%"; | ||
− | if(x>= | + | if(x>=1212) |
if(x<=1277) | if(x<=1277) | ||
− | if(y>= | + | if(y>=181) |
− | if(y<= | + | if(y<=272) |
document.getElementById("myNav9").style.width = "100%"; | document.getElementById("myNav9").style.width = "100%"; | ||
− | if(x>= | + | if(x>=1183) |
− | if(x<= | + | if(x<=1270) |
− | if(y>= | + | if(y>=417) |
− | if(y<= | + | if(y<=517) |
document.getElementById("myNav10").style.width = "100%"; | document.getElementById("myNav10").style.width = "100%"; | ||
if(x>=1098) | if(x>=1098) | ||
if(x<=1183) | if(x<=1183) | ||
− | if(y>= | + | if(y>=582) |
− | if(y<= | + | if(y<=695) |
document.getElementById("myNav11").style.width = "100%"; | document.getElementById("myNav11").style.width = "100%"; | ||
− | if(x>= | + | if(x>=1022) |
if(x<=1095) | if(x<=1095) | ||
− | if(y>= | + | if(y>=677) |
− | if(y<= | + | if(y<=776) |
document.getElementById("myNav12").style.width = "100%"; | document.getElementById("myNav12").style.width = "100%"; | ||
− | if(x>= | + | if(x>=935) |
− | if(x<= | + | if(x<=1010) |
− | if(y>= | + | if(y>=698) |
− | if(y<= | + | if(y<=777) |
document.getElementById("myNav13").style.width = "100%"; | document.getElementById("myNav13").style.width = "100%"; | ||
− | if(x>= | + | if(x>=686) |
− | if(x<= | + | if(x<=758) |
− | if(y>= | + | if(y>=662) |
− | if(y<= | + | if(y<=752) |
document.getElementById("myNav14").style.width = "100%"; | document.getElementById("myNav14").style.width = "100%"; | ||
− | if(x>= | + | if(x>=540) |
− | if(x<= | + | if(x<=616) |
− | if(y>= | + | if(y>=581) |
− | if(y<= | + | if(y<=681) |
document.getElementById("myNav15").style.width = "100%"; | document.getElementById("myNav15").style.width = "100%"; | ||
− | if(x>= | + | if(x>=381) |
− | if(x<= | + | if(x<=453) |
− | if(y>= | + | if(y>=668) |
− | if(y<= | + | if(y<=744) |
document.getElementById("myNav16").style.width = "100%"; | document.getElementById("myNav16").style.width = "100%"; | ||
− | if(x>= | + | if(x>=230) |
− | if(x<= | + | if(x<=318) |
− | if(y>= | + | if(y>=603) |
− | if(y<= | + | if(y<=698) |
document.getElementById("myNav17").style.width = "100%"; | document.getElementById("myNav17").style.width = "100%"; | ||
Revision as of 19:17, 1 November 2017