Showing
1 changed file
with
5 additions
and
4 deletions
@@ -50,12 +50,12 @@ function hideSideBar() { | @@ -50,12 +50,12 @@ function hideSideBar() { | ||
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | -$('.overlay').on('touchstart', function(e) { | 53 | +$overlay.on('touchstart', function() { |
54 | hideSideBar(); | 54 | hideSideBar(); |
55 | return false; | 55 | return false; |
56 | }); | 56 | }); |
57 | 57 | ||
58 | -$sideNav.on('touchmove', function(e) { | 58 | +$sideNav.on('touchmove', function() { |
59 | return false; | 59 | return false; |
60 | }); | 60 | }); |
61 | 61 | ||
@@ -75,13 +75,14 @@ $sideNav.on('touchend', 'li', function(e) { | @@ -75,13 +75,14 @@ $sideNav.on('touchend', 'li', function(e) { | ||
75 | 75 | ||
76 | // 返回一级导航,收起二级导航 | 76 | // 返回一级导航,收起二级导航 |
77 | $subNav.each(function() { | 77 | $subNav.each(function() { |
78 | - $(this).find('li').eq(0).on('touchend', function() { | 78 | + $(this).find('li').eq(0).on('touchstart', function() { |
79 | + | ||
79 | $sideNav.css('pointer-events', 'none'); | 80 | $sideNav.css('pointer-events', 'none'); |
80 | setTimeout(function() { | 81 | setTimeout(function() { |
82 | + $('.sub-nav').removeClass('show'); | ||
81 | $sideNav.css('pointer-events', 'auto'); | 83 | $sideNav.css('pointer-events', 'auto'); |
82 | }, 400); | 84 | }, 400); |
83 | 85 | ||
84 | - $('.sub-nav').removeClass('show'); | ||
85 | }); | 86 | }); |
86 | }).on('touchstart', function(e) { | 87 | }).on('touchstart', function(e) { |
87 | if (e.currentTarget !== e.target) { | 88 | if (e.currentTarget !== e.target) { |
-
Please register or login to post a comment