fix style

This commit is contained in:
chiu 2021-08-31 15:25:53 +08:00
parent eee7df57ed
commit 82304f8c82
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,9 @@
// if (location.href.search('editmode') == -1 && document.getElementsByClassName('asideright').length != 0) { // if (location.href.search('editmode') == -1 && document.getElementsByClassName('asideright').length != 0) {
if ( $('.header-banner').length != 0) { if ( $('.header-banner').length != 0) {
$('.layout-header').css('height', ''); $('.layout-header').css('height', '');
if ($(window).scrollTop() > 50) { /* 要滑動到選單的距離 */ var scrollTop = $(window).scrollTop();
var scrollBottom = $('html').height() - $(window).height() - scrollTop - $('.kenjohn').height();
if (scrollTop>50 && scrollBottom>0) { /* 要滑動到選單的距離 */
$('.kenjohn').addClass('navFixed').removeClass('navRel'); /* 幫選單加上固定效果 */ $('.kenjohn').addClass('navFixed').removeClass('navRel'); /* 幫選單加上固定效果 */
} else { } else {
if ($('.header-banner').html().trim() == "") { if ($('.header-banner').html().trim() == "") {