From 5135f236c2ff57a7002a2b1e27b7b61e8bf3d1f7 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 6 Sep 2018 11:30:50 +0200 Subject: improve cover-photo handling --- view/tpl/cover_photo_widget.tpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 2de3c74be..7972b8e81 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -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', ''); -- cgit v1.2.3