Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
2 changed files
with
6 additions
and
18 deletions
framework @ 119c247f
@@ -16,14 +16,11 @@ var searchH = $('.newbrand-search').outerHeight(), | @@ -16,14 +16,11 @@ var searchH = $('.newbrand-search').outerHeight(), | ||
16 | headerH = $('.yoho-header').outerHeight(), | 16 | headerH = $('.yoho-header').outerHeight(), |
17 | brandSwipe = parseInt(searchH) + parseInt(headerH) - 1; | 17 | brandSwipe = parseInt(searchH) + parseInt(headerH) - 1; |
18 | 18 | ||
19 | -var myHammer, | ||
20 | - brandsData, | 19 | +var brandsData, |
21 | $keyword, | 20 | $keyword, |
22 | searchBtnHammer, | 21 | searchBtnHammer, |
23 | clearTextHammer; | 22 | clearTextHammer; |
24 | 23 | ||
25 | -var $rightBarCon = $('#right-bar .con').find('b').unbind(); | ||
26 | - | ||
27 | swiper = new Swiper('.swiper-container', { | 24 | swiper = new Swiper('.swiper-container', { |
28 | lazyLoading: true, | 25 | lazyLoading: true, |
29 | loop: true, | 26 | loop: true, |
@@ -56,27 +53,18 @@ $(window).scroll(function() { | @@ -56,27 +53,18 @@ $(window).scroll(function() { | ||
56 | }); | 53 | }); |
57 | }); | 54 | }); |
58 | 55 | ||
59 | - | ||
60 | function rightBarBindClick() { | 56 | 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(); | 57 | + $('#right-bar .con').find('b').unbind().on('touchstart', function(e) { |
58 | + var index = $(this).index(); | ||
65 | 59 | ||
66 | if ($('.bar-' + index).size() > 0) { | 60 | if ($('.bar-' + index).size() > 0) { |
67 | document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1); | 61 | document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1); |
68 | } | 62 | } |
69 | - e.srcEvent.stopPropagation(); | 63 | + e.stopPropagation(); |
70 | }); | 64 | }); |
71 | } | 65 | } |
72 | 66 | ||
73 | -if ($rightBarCon[0]) { | ||
74 | - rightBarBindClick(); | ||
75 | -} | ||
76 | - | ||
77 | -/** | ||
78 | - * 品牌搜索 | ||
79 | - */ | 67 | +rightBarBindClick(); |
80 | 68 | ||
81 | function searchResult() { | 69 | function searchResult() { |
82 | var keyword = ($keyword.val() + '').toLowerCase(); | 70 | var keyword = ($keyword.val() + '').toLowerCase(); |
-
Please register or login to post a comment