Team:NCTU Formosa/source/head
From 2013.igem.org
(Difference between revisions)
Line 89: | Line 89: | ||
if (long){ | if (long){ | ||
away = true; | away = true; | ||
- | $('#toc').stop().animate({'top': '-222px'}, 500); | + | $('#toc').stop().css({ |
+ | position: 'fixed' | ||
+ | }).animate({'top': '-222px'}, 500); | ||
}} | }} | ||
} else { | } else { | ||
away = false; | away = false; | ||
if ($(document).scrollTop() < 509){ | if ($(document).scrollTop() < 509){ | ||
- | $('#toc').stop( | + | $('#toc').stop().css({ |
position: 'absolute' | position: 'absolute' | ||
- | });; | + | }).animate({'top': '0px'}, 500);; |
} | } | ||
else { | else { | ||
- | $('#toc').stop( | + | $('#toc').stop().css({ |
position: 'fixed' | position: 'fixed' | ||
- | });; | + | }).animate({'top': '78px'}, 500);; |
} | } | ||
} | } |
Revision as of 08:05, 19 September 2013