...
|
...
|
@@ -57,6 +57,7 @@ function setActive($item) { |
|
|
|
|
|
var $colorList = $item.find('.color-list');
|
|
|
var $sizeList = $item.find('.size-list');
|
|
|
var activeIndex = 0;
|
|
|
|
|
|
$colorList.find('.img-box').each(function(i, box) {
|
|
|
var $box = $(box);
|
...
|
...
|
@@ -64,10 +65,14 @@ function setActive($item) { |
|
|
if ($box.find('img').data('color') === color) {
|
|
|
$colorList.find('.img-box').eq(i).addClass('active');
|
|
|
|
|
|
activeIndex = i;
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$sizeList = $sizeList.eq(activeIndex).removeClass('hide');
|
|
|
|
|
|
$sizeList.find('span').each(function(i, s) {
|
|
|
var $size = $(s);
|
|
|
|
...
|
...
|
|