fix menu
This commit is contained in:
parent
458f4a7e01
commit
22d8734a15
|
@ -9,7 +9,7 @@
|
||||||
if ( $('.header-banner').length != 0) {
|
if ( $('.header-banner').length != 0) {
|
||||||
$('.layout-header').css('height', '');
|
$('.layout-header').css('height', '');
|
||||||
var scrollTop = $(window).scrollTop();
|
var scrollTop = $(window).scrollTop();
|
||||||
var scrollBottom = $('html').height() - $(window).height() - scrollTop - $('.kenjohn').height();
|
var scrollBottom = $('html').height() - $(window).height() - 50 - $('.kenjohn').height();
|
||||||
if (scrollTop>50 && scrollBottom>0) { /* 要滑動到選單的距離 */
|
if (scrollTop>50 && scrollBottom>0) { /* 要滑動到選單的距離 */
|
||||||
$('.kenjohn').addClass('navFixed').removeClass('navRel'); /* 幫選單加上固定效果 */
|
$('.kenjohn').addClass('navFixed').removeClass('navRel'); /* 幫選單加上固定效果 */
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue