Skip to content

Commit becae28

Browse files
committed
fixed:点击示例页侧边栏图标和文字,页面无法滚动的问题 commit by:wuzhuorui ;review by:zhurch
1 parent d8ed94d commit becae28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/js/example.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ function scroll() {
135135
}
136136

137137
function bindEvents() {
138-
$("ul#sidebar-menu>li").on('click', function (evt) {
139-
window.location.hash = "#" + evt.target.id;
138+
$('ul#sidebar-menu>li>a').on('click', function (evt) {
139+
window.location.hash = "#" + evt.currentTarget.id;
140140
});
141141

142142
$("ul#sidebar-menu ul.second-menu a").on('click', function (evt) {

0 commit comments

Comments
 (0)