Merge remote-tracking branch 'origin/hotfix/xieweiguang'
Showing
2 changed files
with
8 additions
and
9 deletions
@@ -88,10 +88,9 @@ $categoryContainer.find('.sub-level').on('touchstart', 'li', function() { | @@ -88,10 +88,9 @@ $categoryContainer.find('.sub-level').on('touchstart', 'li', function() { | ||
88 | $(this).removeClass('highlight'); | 88 | $(this).removeClass('highlight'); |
89 | }); | 89 | }); |
90 | 90 | ||
91 | -$nav.on('touchstart', function(e) { | ||
92 | - var target = e.target || e.srcElement; | ||
93 | - | ||
94 | - target.parentNode.className = 'bytouch ' + target.parentNode.className; | ||
95 | -}).on('touchend touchcancel', function() { | 91 | +$nav.on('touchstart', 'li', function() { |
92 | + $nav.find('li').removeClass('bytouch'); | ||
93 | + $(this).addClass('bytouch'); | ||
94 | +}).on('touchend touchcancel', 'li', function() { | ||
96 | $nav.find('li').removeClass('bytouch'); | 95 | $nav.find('li').removeClass('bytouch'); |
97 | }); | 96 | }); |
@@ -447,10 +447,10 @@ if ($brandHeader.length > 0) { | @@ -447,10 +447,10 @@ if ($brandHeader.length > 0) { | ||
447 | 447 | ||
448 | //初始请求最新第一页数据 | 448 | //初始请求最新第一页数据 |
449 | search(); | 449 | search(); |
450 | -$listNav.on('touchstart', function(e) { | ||
451 | - var target = e.target || e.srcElement; | ||
452 | 450 | ||
453 | - target.parentNode.parentNode.className = 'bytouch ' + target.parentNode.parentNode.className; | ||
454 | -}).on('touchend touchcancel', function() { | 451 | +$listNav.on('touchstart', 'li', function() { |
452 | + $listNav.find('li').removeClass('bytouch'); | ||
453 | + $(this).addClass('bytouch'); | ||
454 | +}).on('touchend touchcancel', 'li', function() { | ||
455 | $listNav.find('li').removeClass('bytouch'); | 455 | $listNav.find('li').removeClass('bytouch'); |
456 | }); | 456 | }); |
-
Please register or login to post a comment