fix error

This commit is contained in:
rulingcom 2021-11-14 03:33:54 +00:00
parent 5464c7c5f8
commit 6a4380801f
1 changed files with 9 additions and 2 deletions

View File

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