Showing
1 changed file
with
5 additions
and
4 deletions
@@ -106,22 +106,23 @@ function diXuanFuInit() { | @@ -106,22 +106,23 @@ function diXuanFuInit() { | ||
106 | 106 | ||
107 | $bottomFixClickArea.children().each((index, elem) => { | 107 | $bottomFixClickArea.children().each((index, elem) => { |
108 | let pageId = $(elem).data('url'); | 108 | let pageId = $(elem).data('url'); |
109 | - let $bottomShow = $('#bottomShow' + pageId + '-' + index); | 109 | + let bottomShowFlag = pageId + '-' + index; |
110 | + let $bottomShow = $('#bottomShow' + bottomShowFlag); | ||
110 | 111 | ||
111 | $bottomShow.load(href + pageId + '.html'); | 112 | $bottomShow.load(href + pageId + '.html'); |
112 | 113 | ||
113 | - $('#bottomClick' + pageId + '-' + index).on('click', () => { | 114 | + $('#bottomClick' + bottomShowFlag).on('click', () => { |
114 | $bottomPerShow.addClass('hide'); | 115 | $bottomPerShow.addClass('hide'); |
115 | if (!lastClickElem) { | 116 | if (!lastClickElem) { |
116 | currentElemclickTimes++; | 117 | currentElemclickTimes++; |
117 | } | 118 | } |
118 | - if (lastClickElem === pageId && currentElemclickTimes > 1) { | 119 | + if (lastClickElem === bottomShowFlag && currentElemclickTimes > 1) { |
119 | currentElemclickTimes = 0; | 120 | currentElemclickTimes = 0; |
120 | } else { | 121 | } else { |
121 | $bottomShow.removeClass('hide'); | 122 | $bottomShow.removeClass('hide'); |
122 | } | 123 | } |
123 | 124 | ||
124 | - lastClickElem = pageId; | 125 | + lastClickElem = bottomShowFlag; |
125 | currentElemclickTimes++; | 126 | currentElemclickTimes++; |
126 | }); | 127 | }); |
127 | }); | 128 | }); |
-
Please register or login to post a comment