diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index edcd237..8a7f4a6 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -11,7 +11,7 @@ var scrollTop = $(window).scrollTop(); var scrollBottom = $('html').height() - $(window).height() - $('.kenjohn').height(); if (scrollTop>5 && scrollBottom>0) { /* 要滑動到選單的距離 */ - if (parseInt($('.layout-content').css('margin-top'))==0){ + if (parseInt($('.layout-content').css('margin-top'))==0 && $('.layout-content.topcontent').offset().top<400){ $('.layout-content').css('margin-top',$('.kenjohn').height()-$('#orbit-bar').height()); } $('.kenjohn').addClass('navFixed').removeClass('navRel'); /* 幫選單加上固定效果 */ @@ -713,6 +713,11 @@ function transdate(){ // 當文件物件模型(DOM)載入後,執行init函數 $(document).ready(function() { + $('.group').each(function(){ + if ($(this).text().trim()==''){ + $(this).css('padding',0); + } + }); //RWD 自動縮放headerbannner function headerH() { if ($(window).outerWidth() < 769) { @@ -827,7 +832,9 @@ function transdate(){ var theTop; if (stop){ $(".kenjohn").addClass('navFixed'); - $('.layout-content').css('margin-top',$('.kenjohn').height()-$('#orbit-bar').height()); + if ($('.layout-content.topcontent').offset().top<400){ + $('.layout-content').css('margin-top',$('.kenjohn').height()-$('#orbit-bar').height()); + } if (parseInt($('.layout-content').css('margin-top')==0)){ theTop = $('.layout-content-inner.container').offset().top-$(".kenjohn").position().top+10; }else{