|
@@ -13,7 +13,8 @@ var goodsSwiper, |
|
@@ -13,7 +13,8 @@ var goodsSwiper, |
13
|
$discountArrow = $('.goodsDiscount .first-item span');
|
13
|
$discountArrow = $('.goodsDiscount .first-item span');
|
14
|
|
14
|
|
15
|
var goodsDiscountEl = document.getElementById('goodsDiscount'),
|
15
|
var goodsDiscountEl = document.getElementById('goodsDiscount'),
|
16
|
- goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
|
16
|
+ goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl),
|
|
|
17
|
+ $discountFirstItem = $(goodsDiscountEl).find('.first-item');
|
17
|
|
18
|
|
18
|
var $cart = $('.cart-bar');
|
19
|
var $cart = $('.cart-bar');
|
19
|
|
20
|
|
|
@@ -62,9 +63,11 @@ if (0 === $discountFolder.children().length) { |
|
@@ -62,9 +63,11 @@ if (0 === $discountFolder.children().length) { |
62
|
if (goodsDiscountHammer && $discountFolder.children().length > 0) {
|
63
|
if (goodsDiscountHammer && $discountFolder.children().length > 0) {
|
63
|
goodsDiscountHammer.on('tap', function(e) {
|
64
|
goodsDiscountHammer.on('tap', function(e) {
|
64
|
if ($discountFolder.is(':hidden')) {
|
65
|
if ($discountFolder.is(':hidden')) {
|
|
|
66
|
+ $discountFirstItem.removeClass('short-text');
|
65
|
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
|
67
|
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
|
66
|
$discountFolder.slideDown();
|
68
|
$discountFolder.slideDown();
|
67
|
} else {
|
69
|
} else {
|
|
|
70
|
+ $discountFirstItem.addClass('short-text');
|
68
|
$discountArrow.removeClass('icon-up').addClass('icon-down').html('');
|
71
|
$discountArrow.removeClass('icon-up').addClass('icon-down').html('');
|
69
|
$discountFolder.slideUp();
|
72
|
$discountFolder.slideUp();
|
70
|
}
|
73
|
}
|