Showing
1 changed file
with
9 additions
and
6 deletions
@@ -70,6 +70,13 @@ function uriLoc(attr, val) { | @@ -70,6 +70,13 @@ function uriLoc(attr, val) { | ||
70 | window.location.href = newHref; | 70 | window.location.href = newHref; |
71 | } | 71 | } |
72 | 72 | ||
73 | +//隐藏高级选项面板 | ||
74 | +function hideSeniorPanel(index) { | ||
75 | + $seniorSubWrap.children('.senior-sub:eq(' + hoveredIndex + ')').addClass('hide'); | ||
76 | + $seniorAttrWrap.children('.attr:eq(' + hoveredIndex + ')').removeClass('hover'); | ||
77 | + hoveredIndex = -1; | ||
78 | +} | ||
79 | + | ||
73 | //屏蔽筛选项双击文字选中 | 80 | //屏蔽筛选项双击文字选中 |
74 | $('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | 81 | $('.filter-box').on('selectstart', '.attr, .brands-index span', function() { |
75 | return false; | 82 | return false; |
@@ -258,9 +265,7 @@ $seniorAttrWrap.on('mouseenter', '.attr', function() { | @@ -258,9 +265,7 @@ $seniorAttrWrap.on('mouseenter', '.attr', function() { | ||
258 | hoveredIndex = index; | 265 | hoveredIndex = index; |
259 | 266 | ||
260 | seniorHoverTime = setTimeout(function() { | 267 | seniorHoverTime = setTimeout(function() { |
261 | - $seniorSubWrap.children('.senior-sub:eq(' + index + ')').addClass('hide'); | ||
262 | - $this.removeClass('hover'); | ||
263 | - hoveredIndex = -1; | 268 | + hideSeniorPanel(); |
264 | }, 100); | 269 | }, 100); |
265 | }); | 270 | }); |
266 | 271 | ||
@@ -286,7 +291,5 @@ $('.senior-sub').on('click', '.multi-select', function() { | @@ -286,7 +291,5 @@ $('.senior-sub').on('click', '.multi-select', function() { | ||
286 | }).on('mouseenter', function() { | 291 | }).on('mouseenter', function() { |
287 | clearTimeout(seniorHoverTime); | 292 | clearTimeout(seniorHoverTime); |
288 | }).on('mouseleave', function() { | 293 | }).on('mouseleave', function() { |
289 | - $seniorSubWrap.children('.senior-sub:eq(' + hoveredIndex + ')').addClass('hide'); | ||
290 | - $seniorAttrWrap.children('.attr:eq(' + hoveredIndex + ')').removeClass('hover'); | ||
291 | - hoveredIndex = -1; | 294 | + hideSeniorPanel(); |
292 | }); | 295 | }); |
-
Please register or login to post a comment