Skip to content

Commit e0230e8

Browse files
committed
优化显示效果
1 parent 8bdfcca commit e0230e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/js/sidebar.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ function sidebarScrollFix() {
4444

4545
//fix小尺寸屏幕下二级菜单高度高于窗口高度时显示不全的情况
4646
var $activeList = $(this).children('ul');
47-
var activeListOffsetBottom = $activeList.height() - visibleOffsetTop; //Math.abs($(window).height() - visibleOffsetTop - $(this).height());
47+
var activeListOffsetBottom = Math.abs($(window).height() - visibleOffsetTop - $(this).height());
4848
var requireActiveListHeight = $activeList.height();
4949
if (activeListOffsetBottom < requireActiveListHeight) {
50-
$activeList.css({"height": activeListOffsetBottom});
50+
$activeList.css({"height": requireActiveListHeight});
5151
//滚动条样式
52-
$activeList.addClass('scroll-list');
52+
$activeList.addClass('scroll-list');
5353
}
5454

5555
}, function (evt) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy