Team:NYMU-Taipei/TopBar
From 2014.igem.org
(Difference between revisions)
m |
m |
||
Line 84: | Line 84: | ||
}, 300, 'easeOutSine'); | }, 300, 'easeOutSine'); | ||
}); | }); | ||
+ | var scroll_py=0; | ||
$(window).scroll(function (){ | $(window).scroll(function (){ | ||
- | var | + | var scroll_y = $(this).scrollTop(); |
+ | var bar_y = $('.left-bar').height(); | ||
$('.left-bar').css({ | $('.left-bar').css({ | ||
- | top: | + | top: bar_y+y-py, |
}); | }); | ||
+ | py=y; | ||
}); | }); | ||
}); | }); |
Revision as of 11:51, 5 May 2014