|
@@ -45,6 +45,7 @@ navHammer.on('tap', function(event) { |
|
@@ -45,6 +45,7 @@ navHammer.on('tap', function(event) { |
45
|
});
|
45
|
});
|
46
|
|
46
|
|
47
|
event.srcEvent.stopPropagation();
|
47
|
event.srcEvent.stopPropagation();
|
|
|
48
|
+ return false;
|
48
|
});
|
49
|
});
|
49
|
|
50
|
|
50
|
mobileWrapHammer = new Hammer($('.mobile-wrap')[0]);
|
51
|
mobileWrapHammer = new Hammer($('.mobile-wrap')[0]);
|
|
@@ -62,11 +63,12 @@ mobileWrapHammer.on('tap', function(e) { |
|
@@ -62,11 +63,12 @@ mobileWrapHammer.on('tap', function(e) { |
62
|
$('.overlay').hide();
|
63
|
$('.overlay').hide();
|
63
|
}, 300);
|
64
|
}, 300);
|
64
|
e.srcEvent.stopPropagation();
|
65
|
e.srcEvent.stopPropagation();
|
|
|
66
|
+ return false;
|
65
|
}
|
67
|
}
|
66
|
});
|
68
|
});
|
67
|
|
69
|
|
68
|
//点击一级导航,弹出二级导航
|
70
|
//点击一级导航,弹出二级导航
|
69
|
-$sideNav.on('touchstart', 'li', function () {
|
71
|
+$sideNav.on('touchend', 'li', function () {
|
70
|
if ($(this).find('.sub-nav').size() > 0) {
|
72
|
if ($(this).find('.sub-nav').size() > 0) {
|
71
|
$('.sub-nav').removeClass('show');
|
73
|
$('.sub-nav').removeClass('show');
|
72
|
$(this).find('.sub-nav').addClass('show');
|
74
|
$(this).find('.sub-nav').addClass('show');
|
|
@@ -75,10 +77,12 @@ $sideNav.on('touchstart', 'li', function () { |
|
@@ -75,10 +77,12 @@ $sideNav.on('touchstart', 'li', function () { |
75
|
|
77
|
|
76
|
//返回一级导航,收起二级导航
|
78
|
//返回一级导航,收起二级导航
|
77
|
$('.sub-nav').each(function () {
|
79
|
$('.sub-nav').each(function () {
|
78
|
- $(this).find('li').eq(0).on('touchstart', function (e) {
|
80
|
+ $(this).find('li').eq(0).on('touchend', function (e) {
|
79
|
$('.sub-nav').removeClass('show');
|
81
|
$('.sub-nav').removeClass('show');
|
80
|
- e.stopPropagation();
|
82
|
+ return false;
|
81
|
});
|
83
|
});
|
|
|
84
|
+}).on('touchend', function() {
|
|
|
85
|
+ $('.sub-nav').find('li').removeClass('current');
|
82
|
});
|
86
|
});
|
83
|
|
87
|
|
84
|
//头部banner轮播
|
88
|
//头部banner轮播
|