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)