Authored by 王水玲

单品日

<div class="single-day-page yoho-page">
<div class="banner"></div>
<div class="swiper-tab"></div>
<div class="tab-area">
<div class="swiper-tab"></div>
</div>
<div class="product-list"></div>
</div>
... ...
... ... @@ -57,12 +57,12 @@ var singleDay = {
self.previousScrollTop = curScrollTop;
};
$(window).on('scroll', function() {
//if ($(window).scrollTop() > self.swiperOTop) {
// self.$swiper.addClass('fixer');
//} else {
// self.$swiper.removeClass('fixer');
//}
$(window).on('scroll touchmove touchstart touchend', function() {
if ($(window).scrollTop() > self.swiperOTop) {
self.$swiper.addClass('fixer');
} else {
self.$swiper.removeClass('fixer');
}
window.requestAnimationFrame(_scrollHandler.bind(self));
});
... ...
... ... @@ -16,13 +16,20 @@
z-index: 2;
}
.swiper-tab {
.tab-area {
width: 100%;
height: 86px;
background: #fff;
border-bottom: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
background: #fff;
box-sizing: border-box;
}
.swiper-tab {
width: 100%;
height: 80px;
//border-bottom: 1px solid #e0e0e0;
//border-top: 1px solid #e0e0e0;
//background: #fff;
li {
float: left;
... ...