Showing
2 changed files
with
8 additions
and
23 deletions
framework @ 119c247f
@@ -22,8 +22,6 @@ var myHammer, | @@ -22,8 +22,6 @@ var myHammer, | ||
22 | searchBtnHammer, | 22 | searchBtnHammer, |
23 | clearTextHammer; | 23 | clearTextHammer; |
24 | 24 | ||
25 | -var $rightBarCon = $('#right-bar .con').find('b').unbind(); | ||
26 | - | ||
27 | swiper = new Swiper('.swiper-container', { | 25 | swiper = new Swiper('.swiper-container', { |
28 | lazyLoading: true, | 26 | lazyLoading: true, |
29 | loop: true, | 27 | loop: true, |
@@ -56,27 +54,14 @@ $(window).scroll(function() { | @@ -56,27 +54,14 @@ $(window).scroll(function() { | ||
56 | }); | 54 | }); |
57 | }); | 55 | }); |
58 | 56 | ||
57 | +$('#right-bar .con').find('b').unbind().on('touchstart', function(e) { | ||
58 | + var index = $(this).index(); | ||
59 | 59 | ||
60 | -function rightBarBindClick() { | ||
61 | - $rightBarCon = $('#right-bar .con').find('b').unbind(); | ||
62 | - myHammer = new Hammer($rightBarCon[0]); | ||
63 | - myHammer.on('tap', function(e) { | ||
64 | - var index = $rightBarCon.index(); | ||
65 | - | ||
66 | - if ($('.bar-' + index).size() > 0) { | ||
67 | - document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1); | ||
68 | - } | ||
69 | - e.srcEvent.stopPropagation(); | ||
70 | - }); | ||
71 | -} | ||
72 | - | ||
73 | -if ($rightBarCon[0]) { | ||
74 | - rightBarBindClick(); | ||
75 | -} | ||
76 | - | ||
77 | -/** | ||
78 | - * 品牌搜索 | ||
79 | - */ | 60 | + if ($('.bar-' + index).size() > 0) { |
61 | + document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1); | ||
62 | + } | ||
63 | + e.stopPropagation(); | ||
64 | +}); | ||
80 | 65 | ||
81 | function searchResult() { | 66 | function searchResult() { |
82 | var keyword = ($keyword.val() + '').toLowerCase(); | 67 | var keyword = ($keyword.val() + '').toLowerCase(); |
-
Please register or login to post a comment