Template:Team:Amsterdam/scripts
From 2012.igem.org
(Difference between revisions)
Line 45: | Line 45: | ||
</script> | </script> | ||
+ | <!-- Navigation scroll follow --> | ||
+ | <script type="text/javascript"> | ||
+ | $(window).scroll(function () { | ||
+ | var winPos = $(window).scrollTop(); | ||
+ | if (winPos > 234) { | ||
+ | $("#sidebar-area").css({position:'fixed', top: 0}); | ||
+ | } else { | ||
+ | $("#sidebar-area").css({position:'relative'}); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
</html> | </html> |
Revision as of 19:24, 25 September 2012