Team:NCTU Formosa/source/head
From 2013.igem.org
(Difference between revisions)
Line 98: | Line 98: | ||
}; | }; | ||
$('#toc').followTo(431); | $('#toc').followTo(431); | ||
+ | }); | ||
+ | $(document).ready(function(){ | ||
+ | var away = false; | ||
+ | |||
+ | $(document).scroll(function() { | ||
+ | if ($(document).scrollTop() > 800) { | ||
+ | if (!away) { | ||
+ | away = true; | ||
+ | $('#toc').stop().animate({'top': '-78px'}, 1500); | ||
+ | } | ||
+ | } else { | ||
+ | away = false; | ||
+ | $('#toc').stop().animate({'top': '78px'}, 1500); | ||
+ | } | ||
+ | }); | ||
}); | }); | ||
</script> | </script> |
Revision as of 19:19, 15 September 2013