Team:Cornell/sandbox/header

From 2013.igem.org

(Difference between revisions)
Line 31: Line 31:
});
});
 +
//change navbar position when scrolling
 +
if (window.pageYOffset < 160) {
 +
$('.navbar').css('position', 'static');
 +
}
 +
else {
 +
$('.navbar').css('position', 'fixed');
 +
}
 +
 +
$(window).scroll(function() {
 +
if (window.pageYOffset < 160) {
 +
$('.navbar').css('position', 'static');
 +
}
 +
else {
 +
$('.navbar').css('position', 'fixed');
 +
}
 +
}
//parallax
//parallax

Revision as of 17:55, 26 July 2014

2014 Cornell iGEM