Showing
1 changed file
with
3 additions
and
2 deletions
@@ -68,18 +68,19 @@ mobileWrapHammer.on('tap', function(e) { | @@ -68,18 +68,19 @@ mobileWrapHammer.on('tap', function(e) { | ||
68 | }); | 68 | }); |
69 | 69 | ||
70 | //点击一级导航,弹出二级导航 | 70 | //点击一级导航,弹出二级导航 |
71 | -$sideNav.on('touchend', 'li', function () { | 71 | +$sideNav.on('touchend', 'li', function (e) { |
72 | if ($(this).find('.sub-nav').size() > 0) { | 72 | if ($(this).find('.sub-nav').size() > 0) { |
73 | $('.sub-nav').removeClass('show'); | 73 | $('.sub-nav').removeClass('show'); |
74 | $(this).find('.sub-nav').addClass('show'); | 74 | $(this).find('.sub-nav').addClass('show'); |
75 | } | 75 | } |
76 | - return false; | 76 | + e.stopPropagation(); |
77 | }); | 77 | }); |
78 | 78 | ||
79 | //返回一级导航,收起二级导航 | 79 | //返回一级导航,收起二级导航 |
80 | $('.sub-nav').each(function () { | 80 | $('.sub-nav').each(function () { |
81 | $(this).find('li').eq(0).on('touchend', function (e) { | 81 | $(this).find('li').eq(0).on('touchend', function (e) { |
82 | $('.sub-nav').removeClass('show'); | 82 | $('.sub-nav').removeClass('show'); |
83 | + e.stopPropagation(); | ||
83 | return false; | 84 | return false; |
84 | }); | 85 | }); |
85 | }).on('touchend', function() { | 86 | }).on('touchend', function() { |
-
Please register or login to post a comment