Team:Cornell/sandbox/header

From 2013.igem.org

(Difference between revisions)
Line 24: Line 24:
}).remove();
}).remove();
-
//width of body wrapper
+
//width of home body wrapper
$(".home").height($(document).height()-200);
$(".home").height($(document).height()-200);
Line 30: Line 30:
$(".home").height($(document).height()-200);
$(".home").height($(document).height()-200);
});
});
 +
 +
//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:53, 26 July 2014

2014 Cornell iGEM