Team:Shenzhen BGIC ATCG/temp/menu.html
From 2013.igem.org
(Difference between revisions)
Line 141: | Line 141: | ||
radius_right= 8; | radius_right= 8; | ||
var setEyeOffset = function(event) { | var setEyeOffset = function(event) { | ||
+ | var scroH = $(window).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 153: | Line 154: | ||
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, | ||
Line 159: | Line 160: | ||
}); | }); | ||
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, |
Revision as of 09:05, 17 September 2013
Playing with my eyes
aren't you?
Hi I am Dr. Mage!
A "budding" yeast cell!