do not increase opacity to more than 1

This commit is contained in:
Mario Vavti 2016-12-13 10:23:56 +01:00
parent 68bdd26426
commit 0979f11cc3

View File

@ -53,7 +53,7 @@
}
}
}
if($('#cover-photo').length) {
if($('#cover-photo').length && $('main').css('opacity') < 1) {
$('main').css('opacity', ($(window).scrollTop()/$('#cover-photo').height()).toFixed(1));
}
});