Showing
6 changed files
with
23 additions
and
15 deletions
@@ -32,8 +32,10 @@ $('.banner-top').css('padding-top', '90px'); | @@ -32,8 +32,10 @@ $('.banner-top').css('padding-top', '90px'); | ||
32 | if ($brandList.length > 0) { | 32 | if ($brandList.length > 0) { |
33 | $(window).scroll(function() { | 33 | $(window).scroll(function() { |
34 | var scrTop = $(window).scrollTop(); | 34 | var scrTop = $(window).scrollTop(); |
35 | + | ||
35 | $('.brand-list').each(function() { | 36 | $('.brand-list').each(function() { |
36 | var offTop = $(this).offset().top - brandSwipe; | 37 | var offTop = $(this).offset().top - brandSwipe; |
38 | + | ||
37 | if (scrTop >= offTop) { | 39 | if (scrTop >= offTop) { |
38 | $brandList.find('.title-bar').css('position', 'static'); | 40 | $brandList.find('.title-bar').css('position', 'static'); |
39 | $(this).find('.title-bar').css({ | 41 | $(this).find('.title-bar').css({ |
@@ -47,10 +49,11 @@ if ($brandList.length > 0) { | @@ -47,10 +49,11 @@ if ($brandList.length > 0) { | ||
47 | }); | 49 | }); |
48 | } | 50 | } |
49 | 51 | ||
50 | -$('#right-bar .con').find('b').unbind().on('tap',function(){ | ||
51 | - var index=$(this).index(); | ||
52 | - if($('.bar-'+index).size()>0){ | ||
53 | - document.body.scrollTop = parseInt($('.bar-'+index)[0].offsetTop) - parseInt(brandSwipe-1); | 52 | +$('#right-bar .con').find('b').unbind().on('tap', function() { |
53 | + var index = $(this).index(); | ||
54 | + | ||
55 | + if ($('.bar-' + index).size() > 0) { | ||
56 | + document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1); | ||
54 | } | 57 | } |
55 | }); | 58 | }); |
56 | 59 |
@@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
3 | * @author: xuqi<qi.xu@yoho.cn> | 3 | * @author: xuqi<qi.xu@yoho.cn> |
4 | * @date: 2015/10/20 | 4 | * @date: 2015/10/20 |
5 | */ | 5 | */ |
6 | - | ||
7 | var $ = require('yoho.zepto'), | 6 | var $ = require('yoho.zepto'), |
8 | Swiper = require('yoho.iswiper'), | 7 | Swiper = require('yoho.iswiper'), |
9 | lazyLoad = require('yoho.zeptolazyload'); | 8 | lazyLoad = require('yoho.zeptolazyload'); |
1 | .discount-page { | 1 | .discount-page { |
2 | - background-color: #f0f0f0; | 2 | + background-color: #fff; |
3 | 3 | ||
4 | .swiper-container { | 4 | .swiper-container { |
5 | width: 100%; | 5 | width: 100%; |
@@ -32,6 +32,7 @@ | @@ -32,6 +32,7 @@ | ||
32 | } | 32 | } |
33 | 33 | ||
34 | .list-nav { | 34 | .list-nav { |
35 | + border:1px solid #e6e6e6; | ||
35 | > li { | 36 | > li { |
36 | float: left; | 37 | float: left; |
37 | width: 25%; | 38 | width: 25%; |
@@ -50,9 +51,14 @@ | @@ -50,9 +51,14 @@ | ||
50 | } | 51 | } |
51 | 52 | ||
52 | .active > a { | 53 | .active > a { |
53 | - border-bottom: 2px solid #000; | ||
54 | color: #000; | 54 | color: #000; |
55 | - | 55 | + .spanTest{ |
56 | + width: auto; | ||
57 | + height: 100%; | ||
58 | + border-bottom: 2px solid #000; | ||
59 | + display: inline-block; | ||
60 | + box-sizing:border-box; | ||
61 | + } | ||
56 | .iconfont { | 62 | .iconfont { |
57 | color: #999; | 63 | color: #999; |
58 | 64 |
@@ -7,13 +7,13 @@ | @@ -7,13 +7,13 @@ | ||
7 | <ul id="list-nav" class="list-nav clearfix"> | 7 | <ul id="list-nav" class="list-nav clearfix"> |
8 | <li class="new active"> | 8 | <li class="new active"> |
9 | <a href="javascript:void(0);"> | 9 | <a href="javascript:void(0);"> |
10 | - 最新 | 10 | + <span class="spanTest">最新</span> |
11 | <span class="iconfont cur"></span> | 11 | <span class="iconfont cur"></span> |
12 | </a> | 12 | </a> |
13 | </li> | 13 | </li> |
14 | <li class="price"> | 14 | <li class="price"> |
15 | <a href="javascript:void(0);"> | 15 | <a href="javascript:void(0);"> |
16 | - 价格 | 16 | + <span class="spanTest">价格</span> |
17 | <span class="icon"> | 17 | <span class="icon"> |
18 | <i class="iconfont up"></i> | 18 | <i class="iconfont up"></i> |
19 | <i class="iconfont down cur"></i> | 19 | <i class="iconfont down cur"></i> |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | </li> | 22 | </li> |
23 | <li class="discount"> | 23 | <li class="discount"> |
24 | <a href="javascript:void(0);"> | 24 | <a href="javascript:void(0);"> |
25 | - 折扣 | 25 | + <span class="spanTest">折扣</span> |
26 | <span class="icon"> | 26 | <span class="icon"> |
27 | <i class="iconfont up"></i> | 27 | <i class="iconfont up"></i> |
28 | <i class="iconfont down cur"></i> | 28 | <i class="iconfont down cur"></i> |
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | </li> | 31 | </li> |
32 | <li class="filter"> | 32 | <li class="filter"> |
33 | <a href="javascript:void(0);"> | 33 | <a href="javascript:void(0);"> |
34 | - 筛选 | 34 | + <span class="spanTest">筛选</span> |
35 | <span class="iconfont"></span> | 35 | <span class="iconfont"></span> |
36 | </a> | 36 | </a> |
37 | </li> | 37 | </li> |
-
Please register or login to post a comment