improve cover-photo handling

This commit is contained in:
Mario Vavti 2018-09-06 11:30:50 +02:00
parent 78c847ef7d
commit 5135f236c2

View File

@ -19,7 +19,6 @@
if(hide_cover) {
hideCover();
coverSlid = true;
}
if($(window).scrollTop() < $('#cover-photo').height()) {
@ -36,7 +35,7 @@
});
$(window).scroll(function () {
if($(window).width() > 755 && $(window).scrollTop() >= $('#cover-photo').height()) {
if($(window).width() > 755 && $(window).scrollTop() > ($('#cover-photo').height() - 1)) {
$('body').css('cursor', '');
$('.navbar').addClass('fixed-top');
$('main').css('margin-top', '');