...
|
...
|
@@ -63,13 +63,13 @@ function hideSideBar() { |
|
|
}
|
|
|
}
|
|
|
|
|
|
$('.overlay').on('touchend', function(e) {
|
|
|
$('.overlay').on('touchstart', function(e) {
|
|
|
hideSideBar();
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
//点击一级导航,弹出二级导航
|
|
|
$sideNav.on('touchend', 'li', function (e) {
|
|
|
$sideNav.on('touchstart', 'li', function (e) {
|
|
|
if ($(this).find('.sub-nav').size() > 0) {
|
|
|
$('.sub-nav').removeClass('show');
|
|
|
$(this).find('.sub-nav').addClass('show');
|
...
|
...
|
@@ -83,12 +83,12 @@ $sideNav.on('touchend', 'li', function (e) { |
|
|
|
|
|
//返回一级导航,收起二级导航
|
|
|
$subNav.each(function () {
|
|
|
$(this).find('li').eq(0).on('touchend', function (e) {
|
|
|
$(this).find('li').eq(0).on('touchstart', function (e) {
|
|
|
$('.sub-nav').removeClass('show');
|
|
|
e.stopPropagation();
|
|
|
return false;
|
|
|
});
|
|
|
}).on('touchend', function(e) {
|
|
|
}).on('touchstart', function(e) {
|
|
|
if (e.currentTarget !== e.target) {
|
|
|
$subNav.find('li').removeClass('current');
|
|
|
}
|
...
|
...
|
|