Template:Team:Calgary/Test
From 2013.igem.org
(Difference between revisions)
Line 6: | Line 6: | ||
$('#Page').css({'position' : 'relative', top : '120px'}); | $('#Page').css({'position' : 'relative', top : '120px'}); | ||
$('#TopBar').css('position', 'static'); | $('#TopBar').css('position', 'static'); | ||
+ | $('#Content').css('top', '0'); | ||
- | if(window.pageYOffset < 100) | + | if(window.pageYOffset < 100) { |
$('#TopBar').css('position', 'static'); | $('#TopBar').css('position', 'static'); | ||
- | else | + | } |
+ | else { | ||
$('#TopBar').css('position', 'fixed'); | $('#TopBar').css('position', 'fixed'); | ||
+ | } | ||
$(window).scroll(function() { | $(window).scroll(function() { | ||
if(window.pageYOffset < 100) | if(window.pageYOffset < 100) | ||
$('#TopBar').css('position', 'static'); | $('#TopBar').css('position', 'static'); | ||
+ | $('#Content').css('top', '0'); | ||
else | else | ||
$('#TopBar').css('position', 'fixed'); | $('#TopBar').css('position', 'fixed'); | ||
+ | $('#Content').css('top', '180px'); | ||
}); | }); | ||
}); | }); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 04:06, 23 September 2013