Team:Cornell/sandbox/header
From 2013.igem.org
(Difference between revisions)
Line 33: | Line 33: | ||
//change navbar position when scrolling | //change navbar position when scrolling | ||
if (window.pageYOffset < 160) { | if (window.pageYOffset < 160) { | ||
- | $( | + | $(".navbar").css('position', 'static'); |
} | } | ||
else { | else { | ||
- | $( | + | $(".navbar").css('position', 'fixed'); |
} | } | ||
$(window).scroll(function() { | $(window).scroll(function() { | ||
if (window.pageYOffset < 160) { | if (window.pageYOffset < 160) { | ||
- | $( | + | $(".navbar").css('position', 'static'); |
} | } | ||
else { | else { | ||
- | $( | + | $(".navbar").css('position', 'fixed'); |
} | } | ||
} | } |
Revision as of 17:56, 26 July 2014