From a81da0ec345fbc6c7334b6b0d5ae11a19a30918b Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 24 Aug 2016 20:06:44 -0700 Subject: off by one pixel --- view/tpl/cover_photo_widget.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'view') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 93e3f057e..2b47270c9 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -11,7 +11,7 @@ $(document).on('click', slideUpCover); if($('#cover-photo').length && $(window).width() > 755) { - if($(window).scrollTop() <= $('#cover-photo').height()) { + if($(window).scrollTop() < $('#cover-photo').height()) { $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); $('aside').css('padding-top', aside_padding_top - $('nav').outerHeight() + 'px'); $('section').css('padding-top', section_padding_top - $('nav').outerHeight() + 'px'); @@ -36,13 +36,13 @@ $('main').css('margin-top', ''); coverSlid = true; } - else if ($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() <= $('#cover-photo').height()){ + else if ($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() < $('#cover-photo').height()){ if(coverSlid) { $(window).scrollTop(Math.ceil($('#cover-photo').height())); setTimeout(function(){ coverSlid = false; }, 1000); } else { - if($(window).scrollTop() <= $('#cover-photo').height()) { + if($(window).scrollTop() < $('#cover-photo').height()) { $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); $('aside').css('padding-top', aside_padding_top - $('nav').outerHeight() + 'px'); $('section').css('padding-top', section_padding_top - $('nav').outerHeight() + 'px'); -- cgit v1.2.3