Team:StuyGem NYC
From 2014hs.igem.org
(Difference between revisions)
Kelvinn1996 (Talk | contribs) |
Kelvinn1996 (Talk | contribs) |
||
Line 105: | Line 105: | ||
<center> | <center> | ||
<img src = "https://static.igem.org/mediawiki/2014hs/b/bd/Dish.gif" class='img' alt=""> | <img src = "https://static.igem.org/mediawiki/2014hs/b/bd/Dish.gif" class='img' alt=""> | ||
- | <canvas id="gameCanvas" width="500" height="500" onclick=></canvas> | + | <canvas id="gameCanvas" width="500" height="500" onclick="load()"></canvas> |
</center> | </center> | ||
</div> | </div> | ||
Line 239: | Line 239: | ||
}, false); | }, false); | ||
- | + | function load(){ | |
- | + | var mousePos = getMousePos(canvas, evt); | |
if (mousePos.x < 250){ | if (mousePos.x < 250){ | ||
if (mousePos.y < 250){ | if (mousePos.y < 250){ | ||
- | + | location.replace("google"); | |
} | } | ||
else if (mousePos.y >= 250){ | else if (mousePos.y >= 250){ | ||
- | + | location.replace("google"); | |
} | } | ||
} | } | ||
else if (mousePos.x >= 250){ | else if (mousePos.x >= 250){ | ||
if (mousePos.y < 250){ | if (mousePos.y < 250){ | ||
- | + | location.replace("google"); | |
} | } | ||
else if (mousePos.y >= 250){ | else if (mousePos.y >= 250){ | ||
- | + | location.replace("google"); | |
} | } | ||
} | } | ||
- | } | + | } |
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 02:08, 11 May 2014
Get in touch!
Visit Our Twitter Page!