Showing
1 changed file
with
6 additions
and
10 deletions
@@ -24,6 +24,9 @@ var start = 0, | @@ -24,6 +24,9 @@ var start = 0, | ||
24 | openSideNav = false, | 24 | openSideNav = false, |
25 | isen = true; | 25 | isen = true; |
26 | 26 | ||
27 | +var attachFastClick = require('./fastclick'); | ||
28 | +attachFastClick(document.body); | ||
29 | + | ||
27 | lazyLoad($('img.lazy')); | 30 | lazyLoad($('img.lazy')); |
28 | noticeScroll('.notice', $('.notice').data('time') * 1000); | 31 | noticeScroll('.notice', $('.notice').data('time') * 1000); |
29 | 32 | ||
@@ -38,8 +41,6 @@ $('.nav-btn').on('touchstart', function() { | @@ -38,8 +41,6 @@ $('.nav-btn').on('touchstart', function() { | ||
38 | $sideNav.css('pointer-events', 'auto'); | 41 | $sideNav.css('pointer-events', 'auto'); |
39 | }, 400); | 42 | }, 400); |
40 | 43 | ||
41 | - //innerScroll.disableScroll($sideNav); | ||
42 | - | ||
43 | return false; | 44 | return false; |
44 | }); | 45 | }); |
45 | 46 | ||
@@ -78,14 +79,9 @@ $sideNav.on('touchend', 'li', function(e) { | @@ -78,14 +79,9 @@ $sideNav.on('touchend', 'li', function(e) { | ||
78 | 79 | ||
79 | // 返回一级导航,收起二级导航 | 80 | // 返回一级导航,收起二级导航 |
80 | $subNav.each(function() { | 81 | $subNav.each(function() { |
81 | - $(this).find('li').eq(0).on('touchstart', function() { | ||
82 | - | ||
83 | - $sideNav.css('pointer-events', 'none'); | ||
84 | - setTimeout(function() { | ||
85 | - $('.sub-nav').removeClass('show'); | ||
86 | - $sideNav.css('pointer-events', 'auto'); | ||
87 | - }, 400); | ||
88 | - | 82 | + $(this).find('li').eq(0).on('click', function() { |
83 | + $('.sub-nav').removeClass('show'); | ||
84 | + return false; | ||
89 | }); | 85 | }); |
90 | }).on('touchstart', function(e) { | 86 | }).on('touchstart', function(e) { |
91 | if (e.currentTarget !== e.target) { | 87 | if (e.currentTarget !== e.target) { |
-
Please register or login to post a comment