Authored by 毕凯

优惠券点击背景变色

@@ -70,6 +70,16 @@ $('#coupon-list').on('touchend', '.employ-main', function() { @@ -70,6 +70,16 @@ $('#coupon-list').on('touchend', '.employ-main', function() {
70 70
71 orderInfo('couponCode', $this.data('coupon-code')); 71 orderInfo('couponCode', $this.data('coupon-code'));
72 orderInfo('couponName', $this.data('coupon-name')); 72 orderInfo('couponName', $this.data('coupon-name'));
  73 +}).on('touchstart', '.employ-main', function() {
  74 + var $this = $(this);
  75 +
  76 + $this.siblings().removeClass('focus');
  77 + $this.addClass('focus');
  78 +}).on('touchend touchcancel', '.employ-main', function() {
  79 + var $this = $(this);
  80 +
  81 + $this.siblings().removeClass('focus');
  82 + $this.removeClass('focus');
73 }); 83 });
74 84
75 $('body').on('touchend', '.not-use', function() { 85 $('body').on('touchend', '.not-use', function() {
@@ -40,6 +40,9 @@ @@ -40,6 +40,9 @@
40 background-size: 100% 100%; 40 background-size: 100% 100%;
41 color: #fff; 41 color: #fff;
42 position: relative; 42 position: relative;
  43 + &.focus {
  44 + background-image: image-url('me/employ/employ-red.jpg');
  45 + }
43 span{ 46 span{
44 width: 34.482759%; 47 width: 34.482759%;
45 height: 100%; 48 height: 100%;