Authored by 周少峰

Merge branch 'feature/mBrandShop' of http://git.dev.yoho.cn/web/yohobuywap into feature/mBrandShop

... ... @@ -9,7 +9,6 @@ var $allProductCell = $('.allproduct'),
$categoryContainer = $('.category-container'),
$contents = $categoryContainer.children('.content'),
$subLevelItem = $categoryContainer.find('.sub-level li'),
$primaryItem = $categoryContainer.find('.primary-level li'),
$trilangle = $categoryContainer.find('.primary-level-trilangle');
//初始化container高度
... ... @@ -53,16 +52,15 @@ $categoryContainer.on('touchend', function(e) {
}
});
$categoryContainer.find('.primary-level').on('touchstart touchend touchcancel', 'li', function() {
$primaryItem.removeClass('highlight');
$categoryContainer.find('.sub-level').on('touchstart', 'li', function() {
$subLevelItem.removeClass('highlight');
$(this).addClass('highlight');
}).on('touchend touchcancel', 'li', function() {
$(this).removeClass('highlight');
});
$categoryContainer.find('.sub-level').on('touchstart', 'li', function() {
$subLevelItem.removeClass('highlight');
$allProductCell.on('touchstart', function() {
$(this).addClass('highlight');
}).on('touchend touchcancel', 'li', function() {
}).on('touchend touchcancel', function() {
$(this).removeClass('highlight');
});
\ No newline at end of file
... ...
... ... @@ -3,12 +3,14 @@
background-color: #fff;
.allproduct {
position: relative;
padding: 0px 30px;
display: block;
height: 89px;
line-height: 89px;
background: #fff;
border-top: 1px solid #e6e6e6;
margin-left: 30px;
&.highlight {
background: #dbdbdb;
}
}
.margin-under-allproduct{
... ... @@ -21,11 +23,12 @@
border-top: 1px solid #e6e6e6;
}
.arrow-icon {
position: absolute;
position: relative;
float: right;
font-size: 30px;
top: 0px;
right: 33px;
color: #e1e1e1;
padding: 0px 10px;
}
.allproductParagaraph {
... ...
{{> layout/header}}
<div class="product-category yoho-page">
<div class="allproduct">
{{# content}}
<a href={{allproduct}}>
{{/ content}}
全部商品
<i class="arrow-icon iconfont">&#xe614;</i>
{{# content}}
<a class="allproduct" href="{{allproduct}}">
全部商品
<span class="arrow-icon iconfont">
&#xe614;
</span>
</a>
</div>
<div class="margin-under-allproduct">
</div>
<div class="margin-under-allproduct">
</div>
<div class="category-container clearfix">
<div class="content">
{{# content}}
<div class="category-container clearfix">
<div class="content">
<ul class="primary-level">
{{# class}}
<li class="p-level-item">{{name}}
... ... @@ -37,8 +34,8 @@
</ul>
{{/ category}}
</div>
{{/ content}}
</div>
</div>
</div>
{{/ content}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...