We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cf4b33 commit 79698b7Copy full SHA for 79698b7
docs/static/web.js
@@ -2,12 +2,21 @@ jQuery(function($) {
2
submenu_init();
3
});
4
5
-// mobile 二级目录的点击功能
+// 二级目录的点击功能
6
function submenu_init() {
7
// 判断当前屏幕
8
jQuery('#example-navbar-collapse li.li-sub').click(function (event) {
9
event.stopPropagation(); // 阻止事件冒泡
10
let ele = jQuery(this).find('.submenu');
11
+
12
+ // 第一次点击需要显示(因为存在兼容性BUG)
13
+ if(!ele.data('click_first')){
14
+ ele.show();
15
+ ele.data('click_first',true)
16
+ return true;
17
+ }
18
19
+ console.log(ele.data('click_first'));
20
// 判断显示隐藏
21
if (ele.is(':visible')) {
22
ele.hide();
0 commit comments