navbar fixes

This commit is contained in:
Asutosh Palai
2016-07-05 03:27:13 -04:00
parent 24f1390145
commit e3b45e18a7
3 changed files with 22 additions and 9 deletions

View File

@ -7,6 +7,18 @@ $(function() {
})
});
$(window).scroll(function() {
var scroll = $(window).scrollTop();
var fTop = $('#new-articles').position().top + $('#new-articles').height();
if (scroll >= fTop) {
$(".navbar-wrapper").addClass("darken");
} else {
$(".navbar-wrapper").removeClass("darken");
}
});
function onYouTubeIframeAPIReady() {
$('.youtube-video').each(function() {
var id = $(this).data('id');