Team:Shenzhen BGIC ATCG/temp/menu.html
From 2013.igem.org
(Difference between revisions)
Line 144: | Line 144: | ||
radius_right= 8; | radius_right= 8; | ||
var setEyeOffset = function(event) { | var setEyeOffset = function(event) { | ||
- | var scrollH=$( | + | var scrollH=$(document).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 157: | ||
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 - scrollH).toFixed(0); |
$(".eye-left").offset({ | $(".eye-left").offset({ | ||
left: x11, | left: x11, | ||
Line 163: | Line 163: | ||
}); | }); | ||
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 - scrollH).toFixed(0) ; |
$(".eye-right").offset({ | $(".eye-right").offset({ | ||
left: x22, | left: x22, | ||
- | top: y22 | + | top: y22 |
}) | }) | ||
}; | }; |
Revision as of 09:42, 17 September 2013
Playing with my eyes
aren't you?
Hi I am Dr. Mage!
A "budding" yeast cell!