Team:Shenzhen BGIC ATCG/temp/menu.html
From 2013.igem.org
(Difference between revisions)
Line 123: | Line 123: | ||
<script> | <script> | ||
$(function(){ | $(function(){ | ||
- | |||
- | |||
Line 145: | Line 143: | ||
radius_right= 8; | radius_right= 8; | ||
var setEyeOffset = function(event) { | var setEyeOffset = function(event) { | ||
+ | var scroH = $(this).scrollTop(); | ||
var offset = $(".eye_wrapper").offset(); | var offset = $(".eye_wrapper").offset(); | ||
var x1 = offset.left + left_center_offset.left; | var x1 = offset.left + left_center_offset.left; | ||
Line 157: | Line 156: | ||
var k2 = Math.atan2(m2, n2); | var k2 = Math.atan2(m2, n2); | ||
var x11 = (Math.cos(k1) * radius_left + x1).toFixed(0); | var x11 = (Math.cos(k1) * radius_left + x1).toFixed(0); | ||
- | var y11 = (( - Math.sin(k1) * radius_left) + y1).toFixed(0); | + | var y11 = (( - Math.sin(k1) * radius_left) + y1).toFixed(0) - scroH; |
$(".eye-left").offset({ | $(".eye-left").offset({ | ||
left: x11, | left: x11, | ||
- | top: y11 | + | top: y11 |
}); | }); | ||
var x22 = (Math.cos(k2) * radius_right + x2).toFixed(0); | var x22 = (Math.cos(k2) * radius_right + x2).toFixed(0); | ||
- | var y22 = (( - Math.sin(k2) * radius_right) + y2).toFixed(0); | + | var y22 = (( - Math.sin(k2) * radius_right) + y2).toFixed(0) - scroH; |
$(".eye-right").offset({ | $(".eye-right").offset({ | ||
left: x22, | left: x22, | ||
- | top: y22 | + | top: y22 |
}) | }) | ||
}; | }; |
Revision as of 08:54, 17 September 2013
Playing with my eyes
aren't you?
Hi I am Dr. Mage!
A "budding" yeast cell!