From e38925f397f09ea3033df4e2b8ca196f4937b390 Mon Sep 17 00:00:00 2001 From: rulingcom Date: Fri, 9 Dec 2022 12:23:53 +0800 Subject: [PATCH] Fix bug. --- assets/javascripts/app.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index e978589..0df4a83 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -12,18 +12,17 @@ } }); function fix_first_element() { - console.log("fix_first_element"); if (!window.has_topest_banner) { $('.downIcon').css('display','none'); var first_element = $('.header-banner'); if(first_element.length == 0){ - first_element = $('.layout-content .layout-content-inner'); + first_element = $('.layout-content .layout-content-inner').eq(0); }else{ if(first_element.html() == ''){ - first_element = $('.layout-content-box').eq(0); + first_element = $('.layout-content .layout-content-inner').eq(0); } } - if(first_element.length){ + if(first_element.length != 0){ first_element.css("margin-top", ""); var ele_offset = first_element[0].getBoundingClientRect().top; if(first_element.parents('.kenjohn.navFixed').length == 0)