Showing
2 changed files
with
6 additions
and
2 deletions
@@ -26,8 +26,10 @@ let categoryObj = { | @@ -26,8 +26,10 @@ let categoryObj = { | ||
26 | let _this = this; | 26 | let _this = this; |
27 | 27 | ||
28 | this.domInit(); | 28 | this.domInit(); |
29 | - _this.el.$tabItem.on('click', function () { | ||
30 | - $(this).toggleClass('active').siblings('.tab-item').removeClass('active'); | 29 | + _this.el.$tabItem.find('.city-name').on('click', function () { |
30 | + let $this = $(this).parents('.tab-item'); | ||
31 | + | ||
32 | + $this.toggleClass('active').siblings('.tab-item').removeClass('active'); | ||
31 | }); | 33 | }); |
32 | 34 | ||
33 | _this.el.$tabItem.find('.right-part:first').show(); | 35 | _this.el.$tabItem.find('.right-part:first').show(); |
-
Please register or login to post a comment