Authored by 梁志锋

update

@@ -16,8 +16,7 @@ var searchH = $('.newbrand-search').outerHeight(), @@ -16,8 +16,7 @@ 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;
@@ -54,14 +53,18 @@ $(window).scroll(function() { @@ -54,14 +53,18 @@ $(window).scroll(function() {
54 }); 53 });
55 }); 54 });
56 55
57 -$('#right-bar .con').find('b').unbind().on('touchstart', function(e) {  
58 - var index = $(this).index(); 56 +function rightBarBindClick() {
  57 + $('#right-bar .con').find('b').unbind().on('touchstart', function(e) {
  58 + var index = $(this).index();
59 59
60 - if ($('.bar-' + index).size() > 0) {  
61 - document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1);  
62 - }  
63 - e.stopPropagation();  
64 -}); 60 + if ($('.bar-' + index).size() > 0) {
  61 + document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1);
  62 + }
  63 + e.stopPropagation();
  64 + });
  65 +}
  66 +
  67 +rightBarBindClick();
65 68
66 function searchResult() { 69 function searchResult() {
67 var keyword = ($keyword.val() + '').toLowerCase(); 70 var keyword = ($keyword.val() + '').toLowerCase();