click/touchstart -> tap
Showing
22 changed files
with
48 additions
and
48 deletions
@@ -15,7 +15,7 @@ $('#search-input').focus(function() { | @@ -15,7 +15,7 @@ $('#search-input').focus(function() { | ||
15 | $(this).blur(); | 15 | $(this).blur(); |
16 | }); | 16 | }); |
17 | 17 | ||
18 | -$nav.delegate('li', 'touchstart', function() { | 18 | +$nav.delegate('li', 'tap', function() { |
19 | var $this = $(this), | 19 | var $this = $(this), |
20 | index = $this.index(); | 20 | index = $this.index(); |
21 | 21 | ||
@@ -30,7 +30,7 @@ $nav.delegate('li', 'touchstart', function() { | @@ -30,7 +30,7 @@ $nav.delegate('li', 'touchstart', function() { | ||
30 | $curContent = $contents.eq(index).removeClass('hide'); | 30 | $curContent = $contents.eq(index).removeClass('hide'); |
31 | }); | 31 | }); |
32 | 32 | ||
33 | -$('.primary-level').delegate('li', 'touchstart', function() { | 33 | +$('.primary-level').delegate('li', 'tap', function() { |
34 | var $this = $(this), | 34 | var $this = $(this), |
35 | index = $this.index(); | 35 | index = $this.index(); |
36 | 36 |
@@ -56,7 +56,7 @@ info.initInfosEvt($infoList); | @@ -56,7 +56,7 @@ info.initInfosEvt($infoList); | ||
56 | }); | 56 | }); |
57 | }()); | 57 | }()); |
58 | 58 | ||
59 | -$nav.delegate('.guang-nav-item', 'touchstart', function() { | 59 | +$nav.delegate('.guang-nav-item', 'tap', function() { |
60 | var $this = $(this), | 60 | var $this = $(this), |
61 | $content, | 61 | $content, |
62 | index; | 62 | index; |
@@ -45,7 +45,7 @@ function setLazyLoadAndMellipsis($infos) { | @@ -45,7 +45,7 @@ function setLazyLoadAndMellipsis($infos) { | ||
45 | * @params $container 逛资讯列表容器 | 45 | * @params $container 逛资讯列表容器 |
46 | */ | 46 | */ |
47 | function initInfosEvt($container) { | 47 | function initInfosEvt($container) { |
48 | - $container.delegate('.like-btn', 'touchstart', function(e) { | 48 | + $container.delegate('.like-btn', 'tap', function(e) { |
49 | var $likeBtn = $(e.currentTarget), | 49 | var $likeBtn = $(e.currentTarget), |
50 | $info = $likeBtn.closest('.guang-info'), | 50 | $info = $likeBtn.closest('.guang-info'), |
51 | opt = 'ok'; | 51 | opt = 'ok'; |
@@ -37,7 +37,7 @@ setTimeout(function() { | @@ -37,7 +37,7 @@ setTimeout(function() { | ||
37 | info.initInfosEvt($infosContainer); | 37 | info.initInfosEvt($infosContainer); |
38 | 38 | ||
39 | //文字介绍收起与展开 | 39 | //文字介绍收起与展开 |
40 | -$('#more-intro').bind('touchstart', function() { | 40 | +$('#more-intro').bind('tap', function() { |
41 | var $this = $(this); | 41 | var $this = $(this); |
42 | 42 | ||
43 | $this.toggleClass('spread'); | 43 | $this.toggleClass('spread'); |
@@ -56,7 +56,7 @@ $('#more-intro').bind('touchstart', function() { | @@ -56,7 +56,7 @@ $('#more-intro').bind('touchstart', function() { | ||
56 | }); | 56 | }); |
57 | 57 | ||
58 | //品牌收藏 | 58 | //品牌收藏 |
59 | -$('#brand-like').bind('touchstart', function(e) { | 59 | +$('#brand-like').bind('tap', function(e) { |
60 | var opt = 'ok', | 60 | var opt = 'ok', |
61 | $this = $(this); | 61 | $this = $(this); |
62 | 62 |
@@ -20,7 +20,7 @@ mySwiper = new Swiper('.swiper-container', { | @@ -20,7 +20,7 @@ mySwiper = new Swiper('.swiper-container', { | ||
20 | pagination: '.swiper-pagination' | 20 | pagination: '.swiper-pagination' |
21 | }); | 21 | }); |
22 | 22 | ||
23 | -$('#nav-tab').delegate('li', 'touchstart', function() { | 23 | +$('#nav-tab').delegate('li', 'tap', function() { |
24 | if ($(this).hasClass('focus')) { | 24 | if ($(this).hasClass('focus')) { |
25 | return; | 25 | return; |
26 | } | 26 | } |
@@ -6,13 +6,13 @@ | @@ -6,13 +6,13 @@ | ||
6 | 6 | ||
7 | var $ = require('yoho.zepto'); | 7 | var $ = require('yoho.zepto'); |
8 | 8 | ||
9 | -var $input = $('#search-input > input'); | 9 | +var $input = $('#search-input input'); |
10 | 10 | ||
11 | -var $clear = $('#search-input > .clear-input'); | 11 | +var $clear = $('#search-input .clear-input'); |
12 | 12 | ||
13 | var $history = $('.history'); | 13 | var $history = $('.history'); |
14 | 14 | ||
15 | -$('#clear-history').bind('touchstart', function() { | 15 | +$('#clear-history').bind('tap', function() { |
16 | $.ajax({ | 16 | $.ajax({ |
17 | type: 'POST', | 17 | type: 'POST', |
18 | url: '/search/clearHistory', | 18 | url: '/search/clearHistory', |
@@ -32,6 +32,6 @@ $input.bind('input', function() { | @@ -32,6 +32,6 @@ $input.bind('input', function() { | ||
32 | } | 32 | } |
33 | }); | 33 | }); |
34 | 34 | ||
35 | -$clear.bind('touchstart', function() { | 35 | +$clear.bind('tap', function() { |
36 | $input.val('').trigger('input'); | 36 | $input.val('').trigger('input'); |
37 | }); | 37 | }); |
@@ -33,7 +33,7 @@ function bindEyesEvt() { | @@ -33,7 +33,7 @@ function bindEyesEvt() { | ||
33 | $hasEye.append('<div class="eye close"></div>'); | 33 | $hasEye.append('<div class="eye close"></div>'); |
34 | $eye = $hasEye.children('.eye'); | 34 | $eye = $hasEye.children('.eye'); |
35 | 35 | ||
36 | - $eye.on('touchstart', function(e) { | 36 | + $eye.on('tap', function(e) { |
37 | var $this = $(this), | 37 | var $this = $(this), |
38 | $pwd = $this.siblings('.pwd'); | 38 | $pwd = $this.siblings('.pwd'); |
39 | 39 | ||
@@ -58,7 +58,7 @@ function bindClearEvt() { | @@ -58,7 +58,7 @@ function bindClearEvt() { | ||
58 | $hasClear.append('<div class="clear-input"></div>'); | 58 | $hasClear.append('<div class="clear-input"></div>'); |
59 | $clear = $hasClear.children('.clear-input'); | 59 | $clear = $hasClear.children('.clear-input'); |
60 | 60 | ||
61 | - $clear.on('touchstart', function(e) { | 61 | + $clear.on('tap', function(e) { |
62 | var $input = $clear.siblings('.input'); | 62 | var $input = $clear.siblings('.input'); |
63 | 63 | ||
64 | $input.val('').trigger('input').focus(); | 64 | $input.val('').trigger('input').focus(); |
@@ -11,7 +11,7 @@ var $resend = $('#resend'); | @@ -11,7 +11,7 @@ var $resend = $('#resend'); | ||
11 | var tip = require('../../plugin/tip'), | 11 | var tip = require('../../plugin/tip'), |
12 | showErrTip = tip.show; | 12 | showErrTip = tip.show; |
13 | 13 | ||
14 | -$resend.on('touchstart', function(e) { | 14 | +$resend.on('tap', function(e) { |
15 | e.preventDefault(); | 15 | e.preventDefault(); |
16 | 16 | ||
17 | $.ajax({ | 17 | $.ajax({ |
@@ -24,7 +24,7 @@ $email.bind('input', function() { | @@ -24,7 +24,7 @@ $email.bind('input', function() { | ||
24 | } | 24 | } |
25 | }); | 25 | }); |
26 | 26 | ||
27 | -$btnSure.on('touchstart', function() { | 27 | +$btnSure.on('tap', function() { |
28 | var email = trim($email.val()); | 28 | var email = trim($email.val()); |
29 | 29 | ||
30 | if ($btnSure.hasClass('disable')) { | 30 | if ($btnSure.hasClass('disable')) { |
@@ -32,7 +32,7 @@ $countrySelect.change(function() { | @@ -32,7 +32,7 @@ $countrySelect.change(function() { | ||
32 | $areaCode.text($countrySelect.val()); | 32 | $areaCode.text($countrySelect.val()); |
33 | }); | 33 | }); |
34 | 34 | ||
35 | -$btnNext.on('touchstart', function() { | 35 | +$btnNext.on('tap', function() { |
36 | var pn = trim($phoneNum.val()), | 36 | var pn = trim($phoneNum.val()), |
37 | area = $countrySelect.val(); | 37 | area = $countrySelect.val(); |
38 | 38 |
@@ -45,7 +45,7 @@ module.exports = function(useInRegister) { | @@ -45,7 +45,7 @@ module.exports = function(useInRegister) { | ||
45 | }); | 45 | }); |
46 | 46 | ||
47 | //重新发送验证码 | 47 | //重新发送验证码 |
48 | - $captchaTip.on('touchstart', function() { | 48 | + $captchaTip.on('tap', function() { |
49 | if ($captchaTip.hasClass('disable')) { | 49 | if ($captchaTip.hasClass('disable')) { |
50 | return; | 50 | return; |
51 | } | 51 | } |
@@ -70,7 +70,7 @@ module.exports = function(useInRegister) { | @@ -70,7 +70,7 @@ module.exports = function(useInRegister) { | ||
70 | }); | 70 | }); |
71 | }); | 71 | }); |
72 | 72 | ||
73 | - $btnNext.on('touchstart', function() { | 73 | + $btnNext.on('tap', function() { |
74 | if ($btnNext.hasClass('disable')) { | 74 | if ($btnNext.hasClass('disable')) { |
75 | return; | 75 | return; |
76 | } | 76 | } |
@@ -64,7 +64,7 @@ $countrySelect.change(function() { | @@ -64,7 +64,7 @@ $countrySelect.change(function() { | ||
64 | $areaCode.text($countrySelect.val()); | 64 | $areaCode.text($countrySelect.val()); |
65 | }); | 65 | }); |
66 | 66 | ||
67 | -$loginBtn.on('touchstart', function() { | 67 | +$loginBtn.on('tap', function() { |
68 | var pn = trim($phoneNum.val()), | 68 | var pn = trim($phoneNum.val()), |
69 | areaCode = $countrySelect.val(), | 69 | areaCode = $countrySelect.val(), |
70 | pwd = trim($pwd.val()); | 70 | pwd = trim($pwd.val()); |
@@ -68,7 +68,7 @@ $pwd.bind('input', function() { | @@ -68,7 +68,7 @@ $pwd.bind('input', function() { | ||
68 | 68 | ||
69 | 69 | ||
70 | // Login | 70 | // Login |
71 | -$loginBtn.on('touchstart', function() { | 71 | +$loginBtn.on('tap', function() { |
72 | var acc = trim($account.val()), | 72 | var acc = trim($account.val()), |
73 | pwd = trim($pwd.val()); | 73 | pwd = trim($pwd.val()); |
74 | 74 | ||
@@ -107,15 +107,15 @@ $loginBtn.on('touchstart', function() { | @@ -107,15 +107,15 @@ $loginBtn.on('touchstart', function() { | ||
107 | }); | 107 | }); |
108 | 108 | ||
109 | 109 | ||
110 | -$('#forget-pwd').on('touchstart', function() { | 110 | +$('#forget-pwd').on('tap', function() { |
111 | showRetrivePanel(); | 111 | showRetrivePanel(); |
112 | }); | 112 | }); |
113 | 113 | ||
114 | -$mask.on('touchstart', function() { | 114 | +$mask.on('tap', function() { |
115 | hideRetrivePanel(); | 115 | hideRetrivePanel(); |
116 | }); | 116 | }); |
117 | 117 | ||
118 | -$('#cancel-retrive').on('touchstart', function(e) { | 118 | +$('#cancel-retrive').on('tap', function(e) { |
119 | e.preventDefault(); | 119 | e.preventDefault(); |
120 | hideRetrivePanel(); | 120 | hideRetrivePanel(); |
121 | }); | 121 | }); |
@@ -24,7 +24,7 @@ $pwd.bind('input', function() { | @@ -24,7 +24,7 @@ $pwd.bind('input', function() { | ||
24 | } | 24 | } |
25 | }); | 25 | }); |
26 | 26 | ||
27 | -$btnSure.on('touchstart', function() { | 27 | +$btnSure.on('tap', function() { |
28 | var pwd = trim($pwd.val()); | 28 | var pwd = trim($pwd.val()); |
29 | 29 | ||
30 | if ($btnSure.hasClass('disable')) { | 30 | if ($btnSure.hasClass('disable')) { |
@@ -32,7 +32,7 @@ $countrySelect.change(function() { | @@ -32,7 +32,7 @@ $countrySelect.change(function() { | ||
32 | $areaCode.text($countrySelect.val()); | 32 | $areaCode.text($countrySelect.val()); |
33 | }); | 33 | }); |
34 | 34 | ||
35 | -$btnNext.on('touchstart', function() { | 35 | +$btnNext.on('tap', function() { |
36 | var pn = trim($phoneNum.val()), | 36 | var pn = trim($phoneNum.val()), |
37 | areaCode = $countrySelect.val(); | 37 | areaCode = $countrySelect.val(); |
38 | 38 |
@@ -33,7 +33,7 @@ function registerCbFn(cb) { | @@ -33,7 +33,7 @@ function registerCbFn(cb) { | ||
33 | $classify.children(':first-child').addClass('active'); //T:不在HTML中使用{{#if @first}}active{{/if}}来初始化active为避免sub设置高度时的闪烁 | 33 | $classify.children(':first-child').addClass('active'); //T:不在HTML中使用{{#if @first}}active{{/if}}来初始化active为避免sub设置高度时的闪烁 |
34 | 34 | ||
35 | //classify switch | 35 | //classify switch |
36 | -$classify.delegate('.classify-item', 'touchstart', function() { | 36 | +$classify.delegate('.classify-item', 'tap', function() { |
37 | var $this = $(this); | 37 | var $this = $(this); |
38 | 38 | ||
39 | if ($this.hasClass('active')) { | 39 | if ($this.hasClass('active')) { |
@@ -46,11 +46,11 @@ $classify.delegate('.classify-item', 'touchstart', function() { | @@ -46,11 +46,11 @@ $classify.delegate('.classify-item', 'touchstart', function() { | ||
46 | }); | 46 | }); |
47 | 47 | ||
48 | //点击Mask隐藏筛选界面 | 48 | //点击Mask隐藏筛选界面 |
49 | -$filter.filter('.filter-mask').click(function() { | 49 | +$filter.filter('.filter-mask').tap(function() { |
50 | hideFilter(); | 50 | hideFilter(); |
51 | }); | 51 | }); |
52 | 52 | ||
53 | -$subClassify.delegate('li', 'click', function(e) { | 53 | +$subClassify.delegate('li', 'tap', function(e) { |
54 | var $this = $(this), | 54 | var $this = $(this), |
55 | id = $this.data('id'); | 55 | id = $this.data('id'); |
56 | 56 |
@@ -17,7 +17,7 @@ var $tip, tipItime; | @@ -17,7 +17,7 @@ var $tip, tipItime; | ||
17 | $('.yoho-page').append(tipHtml); | 17 | $('.yoho-page').append(tipHtml); |
18 | 18 | ||
19 | $tip = $('#yoho-tip'); | 19 | $tip = $('#yoho-tip'); |
20 | - $tip.on('touchstart', function() { | 20 | + $tip.on('tap', function() { |
21 | $tip.hide(); | 21 | $tip.hide(); |
22 | 22 | ||
23 | //清除Timeout | 23 | //清除Timeout |
@@ -210,7 +210,7 @@ filter.registerCbFn(search); | @@ -210,7 +210,7 @@ filter.registerCbFn(search); | ||
210 | //3.筛选无active时点击展开筛选面板 | 210 | //3.筛选无active时点击展开筛选面板 |
211 | //4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态 | 211 | //4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态 |
212 | //5.当前active为筛选并且点击其他项时,隐藏筛选面板 | 212 | //5.当前active为筛选并且点击其他项时,隐藏筛选面板 |
213 | -$listNav.delegate('li', 'touchstart', function() { | 213 | +$listNav.delegate('li', 'tap', function() { |
214 | var $this = $(this), | 214 | var $this = $(this), |
215 | nav, | 215 | nav, |
216 | navType, | 216 | navType, |
@@ -309,19 +309,19 @@ $(window).scroll(function() { | @@ -309,19 +309,19 @@ $(window).scroll(function() { | ||
309 | }); | 309 | }); |
310 | 310 | ||
311 | //品牌介绍 | 311 | //品牌介绍 |
312 | -$brandHeader.children('.btn-intro').bind('touchstart', function() { | 312 | +$brandHeader.children('.btn-intro').bind('tap', function() { |
313 | $introBox.removeClass('hide'); | 313 | $introBox.removeClass('hide'); |
314 | }); | 314 | }); |
315 | 315 | ||
316 | -$('.close-intro, .brand-intro-box').click(function() { | 316 | +$('.close-intro, .brand-intro-box').tap(function() { |
317 | $introBox.addClass('hide'); | 317 | $introBox.addClass('hide'); |
318 | }); | 318 | }); |
319 | 319 | ||
320 | -$('#brand-intro').click(function(e) { | 320 | +$('#brand-intro').tap(function(e) { |
321 | e.stopPropagation(); | 321 | e.stopPropagation(); |
322 | }); | 322 | }); |
323 | 323 | ||
324 | //品牌收藏 | 324 | //品牌收藏 |
325 | -$brandHeader.children('.btn-col').bind('touchstart', function() { | 325 | +$brandHeader.children('.btn-col').bind('tap', function() { |
326 | $(this).toggleClass('coled'); | 326 | $(this).toggleClass('coled'); |
327 | }); | 327 | }); |
@@ -10,7 +10,7 @@ var $cartContent = $('.cart-content'); | @@ -10,7 +10,7 @@ var $cartContent = $('.cart-content'); | ||
10 | 10 | ||
11 | require('./good'); | 11 | require('./good'); |
12 | 12 | ||
13 | -$('.cart-nav').delegate('li', 'touchstart', function() { | 13 | +$('.cart-nav').delegate('li', 'tap', function() { |
14 | var $this = $(this); | 14 | var $this = $(this); |
15 | 15 | ||
16 | if ($this.hasClass('active')) { | 16 | if ($this.hasClass('active')) { |
@@ -37,7 +37,7 @@ function remove() { | @@ -37,7 +37,7 @@ function remove() { | ||
37 | $('.chose-panel').remove(); | 37 | $('.chose-panel').remove(); |
38 | } | 38 | } |
39 | 39 | ||
40 | -$('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | 40 | +$('.yoho-page').delegate('.chose-panel', 'tap', function(e) { |
41 | var $cur = $(e.target); | 41 | var $cur = $(e.target); |
42 | 42 | ||
43 | if ($cur.closest('.main').length > 0) { | 43 | if ($cur.closest('.main').length > 0) { |
@@ -46,10 +46,10 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | @@ -46,10 +46,10 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | ||
46 | 46 | ||
47 | //点击蒙版消失 | 47 | //点击蒙版消失 |
48 | remove(); | 48 | remove(); |
49 | -}).delegate('#chose-btn-sure', 'touchstart', function() { | 49 | +}).delegate('#chose-btn-sure', 'tap', function() { |
50 | 50 | ||
51 | //确定 | 51 | //确定 |
52 | -}).delegate('.block', 'touchstart', function() { | 52 | +}).delegate('.block', 'tap', function() { |
53 | 53 | ||
54 | //尺寸颜色点选 | 54 | //尺寸颜色点选 |
55 | var $this = $(this); | 55 | var $this = $(this); |
@@ -60,7 +60,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | @@ -60,7 +60,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | ||
60 | 60 | ||
61 | $this.siblings('.chosed').removeClass('chosed'); | 61 | $this.siblings('.chosed').removeClass('chosed'); |
62 | $this.addClass('chosed'); | 62 | $this.addClass('chosed'); |
63 | -}).delegate('.btn-minus', 'touchstart', function() { | 63 | +}).delegate('.btn-minus', 'tap', function() { |
64 | var num = +$num.val(); | 64 | var num = +$num.val(); |
65 | 65 | ||
66 | if (num === 1) { | 66 | if (num === 1) { |
@@ -68,7 +68,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | @@ -68,7 +68,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) { | ||
68 | } | 68 | } |
69 | 69 | ||
70 | $num.val(num - 1); | 70 | $num.val(num - 1); |
71 | -}).delegate('.btn-plus', 'touchstart', function() { | 71 | +}).delegate('.btn-plus', 'tap', function() { |
72 | var num = +$num.val(); | 72 | var num = +$num.val(); |
73 | 73 | ||
74 | //TODO:库存数验证 | 74 | //TODO:库存数验证 |
@@ -11,7 +11,7 @@ var chosePanel = require('./chose-panel'); | @@ -11,7 +11,7 @@ var chosePanel = require('./chose-panel'); | ||
11 | 11 | ||
12 | lazyLoad($('.lazy')); | 12 | lazyLoad($('.lazy')); |
13 | 13 | ||
14 | -$('.gift-advance-page').delegate('.chose', 'touchstart', function() { | 14 | +$('.gift-advance-page').delegate('.chose', 'tap', function() { |
15 | var id = $(this).closest('.gift-advance-good').data('id'); | 15 | var id = $(this).closest('.gift-advance-good').data('id'); |
16 | 16 | ||
17 | $.ajax({ | 17 | $.ajax({ |
@@ -17,12 +17,12 @@ function docTouchEvt(e) { | @@ -17,12 +17,12 @@ function docTouchEvt(e) { | ||
17 | $('.opt-panel:not(.hide)').addClass('hide'); | 17 | $('.opt-panel:not(.hide)').addClass('hide'); |
18 | 18 | ||
19 | // | 19 | // |
20 | - $(document).unbind('touchstart', docTouchEvt); | 20 | + $(document).unbind('tap', docTouchEvt); |
21 | } | 21 | } |
22 | } | 22 | } |
23 | 23 | ||
24 | // function unbindDocTouchEvt(e) { | 24 | // function unbindDocTouchEvt(e) { |
25 | -// $(document).unbind('touchstart', docTouchEvt); | 25 | +// $(document).unbind('tap', docTouchEvt); |
26 | // } | 26 | // } |
27 | 27 | ||
28 | ellipsis.init(); | 28 | ellipsis.init(); |
@@ -32,7 +32,7 @@ lazyLoad($('.lazy')); | @@ -32,7 +32,7 @@ lazyLoad($('.lazy')); | ||
32 | $('.name')[0].mlellipsis(2); | 32 | $('.name')[0].mlellipsis(2); |
33 | 33 | ||
34 | //TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods | 34 | //TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods |
35 | -$('.cart-goods').delegate('.checkbox', 'touchstart', function() { | 35 | +$('.cart-goods').delegate('.checkbox', 'tap', function() { |
36 | var $this = $(this); | 36 | var $this = $(this); |
37 | 37 | ||
38 | if ($this.hasClass('icon-cb-checked')) { | 38 | if ($this.hasClass('icon-cb-checked')) { |
@@ -40,7 +40,7 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() { | @@ -40,7 +40,7 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() { | ||
40 | } else { | 40 | } else { |
41 | $this.removeClass('icon-checkbox').addClass('icon-cb-checked'); | 41 | $this.removeClass('icon-checkbox').addClass('icon-cb-checked'); |
42 | } | 42 | } |
43 | -}).delegate('.icon-edit', 'touchstart', function() { | 43 | +}).delegate('.icon-edit', 'tap', function() { |
44 | var id = $(this).closest('.shopping-cart-good').data('id'); | 44 | var id = $(this).closest('.shopping-cart-good').data('id'); |
45 | 45 | ||
46 | $.ajax({ | 46 | $.ajax({ |
@@ -55,13 +55,13 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() { | @@ -55,13 +55,13 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() { | ||
55 | } | 55 | } |
56 | } | 56 | } |
57 | }); | 57 | }); |
58 | -}).delegate('.icon-del', 'touchstart', function(e) { | 58 | +}).delegate('.icon-del', 'tap', function(e) { |
59 | e.stopPropagation(); | 59 | e.stopPropagation(); |
60 | 60 | ||
61 | $(this).closest('.shopping-cart-good').children('.opt-panel').removeClass('hide'); | 61 | $(this).closest('.shopping-cart-good').children('.opt-panel').removeClass('hide'); |
62 | 62 | ||
63 | - $(document).bind('touchstart', docTouchEvt); | ||
64 | -}).delegate('.opt-panel', 'touchstart', function() { | 63 | + $(document).bind('tap', docTouchEvt); |
64 | +}).delegate('.opt-panel', 'tap', function() { | ||
65 | var $this = $(this), | 65 | var $this = $(this), |
66 | id = $this.closest('.shopping-cart-good').data('id'); | 66 | id = $this.closest('.shopping-cart-good').data('id'); |
67 | 67 |
-
Please register or login to post a comment