Showing
6 changed files
with
33 additions
and
3 deletions
@@ -34,3 +34,11 @@ navHammer.on('tap', function(e) { | @@ -34,3 +34,11 @@ navHammer.on('tap', function(e) { | ||
34 | 34 | ||
35 | $(document).trigger('scroll'); //Trigger lazyLoad | 35 | $(document).trigger('scroll'); //Trigger lazyLoad |
36 | }); | 36 | }); |
37 | +$('#nav-tab').on('touchstart', function(e) { | ||
38 | + var target = e.target || e.srcElement; | ||
39 | + | ||
40 | + target.className = 'bytouch ' + target.className; | ||
41 | + console.log(target); | ||
42 | +}).on('touchend touchcancel', function() { | ||
43 | + $navs.removeClass('bytouch'); | ||
44 | +}); |
@@ -373,3 +373,11 @@ $(window).scroll(function() { | @@ -373,3 +373,11 @@ $(window).scroll(function() { | ||
373 | 373 | ||
374 | //初始请求最新第一页数据 | 374 | //初始请求最新第一页数据 |
375 | search(); | 375 | search(); |
376 | + | ||
377 | +$listNav.on('touchstart', function(e) { | ||
378 | + var target = e.target || e.srcElement; | ||
379 | + | ||
380 | + target.parentNode.parentNode.className = 'bytouch ' + target.parentNode.parentNode.className; | ||
381 | +}).on('touchend touchcancel', function() { | ||
382 | + $listNav.find('li').removeClass('bytouch'); | ||
383 | +}); |
@@ -385,3 +385,11 @@ $(window).scroll(function() { | @@ -385,3 +385,11 @@ $(window).scroll(function() { | ||
385 | 385 | ||
386 | //初始请求最新第一页数据 | 386 | //初始请求最新第一页数据 |
387 | search(); | 387 | search(); |
388 | + | ||
389 | +$listNav.on('touchstart', function(e) { | ||
390 | + var target = e.target || e.srcElement; | ||
391 | + | ||
392 | + target.parentNode.className = 'bytouch ' + target.parentNode.className; | ||
393 | +}).on('touchend touchcancel', function() { | ||
394 | + $listNav.find('li').removeClass('bytouch'); | ||
395 | +}); |
-
Please register or login to post a comment