Authored by mark

add redcar fixed

... ... @@ -329,18 +329,6 @@
</div>
{{/ consultComment}}
{{# consultComment}}
<div class="lazy-load-object">
<textarea class="datalazyload" style="visibility: hidden;">
<script>
fetchComment();
fetchReturn();
loadRecommend();
</script>
</textarea>
</div>
<div class="consult-comment info-block" id="goodsAsk">
<p class="block-title">
... ... @@ -494,6 +482,7 @@
{{/ consultComment}}
</div>
<div class="redcar">
<div class="redcar-btn">
... ... @@ -501,11 +490,11 @@
</div>
<div class="redcar-nav">
<ul>
<li><a href="#goodsMessage" class="fixed">&nbsp;&nbsp;商品信息</a></li>
<li><a href="#sizeMessage">&nbsp;&nbsp;尺码信息</a></li>
<li><a href="#goodsInside">&nbsp;&nbsp;商品详情</a></li>
<li><a href="#judge">&nbsp;&nbsp;商品评价</a></li>
<li><a href="#goodsAsk">&nbsp;&nbsp;商品咨询</a></li>
<li><a href="#goodsMessage" class="fixed option">&nbsp;&nbsp;商品信息</a></li>
<li><a href="#sizeMessage" class="option">&nbsp;&nbsp;尺码信息</a></li>
<li><a href="#goodsInside" class="option">&nbsp;&nbsp;商品详情</a></li>
<li><a href="#judge" class="option">&nbsp;&nbsp;商品评价</a></li>
<li><a href="#goodsAsk" class="option">&nbsp;&nbsp;商品咨询</a></li>
</ul>
</div>
</div>
... ...
... ... @@ -904,40 +904,6 @@ function fetchComment() {
});
}
// $('.consult-comment').on('click', '.title', function() {
// var $this = $(this),
// index = $this.index();
//
// var $comments = $('.comments'),
// $consults = $('.consults');
//
// if ($this.hasClass('cur')) {
// return;
// }
//
// $this.addClass('cur');
// $this.siblings('.cur').removeClass('cur');
//
// if (index !== 0) {
//
// // 咨询
// $consults.slideDown(SLIDETIME);
// $comments.slideUp(SLIDETIME);
// } else {
// $consults.slideUp(SLIDETIME);
// $comments.slideDown(SLIDETIME);
// }
// }).on('click', '.load-more', function() {
// var $this = $(this);
//
// if ($this.hasClass('load-more-comments')) {
// loadAllComments(currentType);
// } else {
// loadConsults();
// }
// });
$('.consult-comment').on('click', '.load-more', function() {
var $this = $(this);
... ... @@ -1297,5 +1263,26 @@ bindEvent.fire();
}());
$(window).scroll(function(){
var scrollStart = $('.other-infos').offset().top;
var scrollEnd = $('#judge').offset().top;
if($(document).scrollTop() >= scrollStart && $(document).scrollTop() <= scrollEnd){
$('.redcar').addClass('fixednav');
}else {
$('.redcar').removeClass('fixednav');
}
});
$('.redcar').on('click', '.option', function(){
var $this = $(this);
if($this.hasClass('fixed')){
return;
}
$this.closest('li').siblings().find('.option').removeClass('fixed');
$this.addClass('fixed');
});
// 数据懒加载
dataLazyLoad.init({cls: '.datalazyload', threshold: 0});
... ...
... ... @@ -711,6 +711,15 @@
}
.fixednav{
position: fixed;
top:-30px;
right:22px;
}
.redcar{
background-color: #f5f5f5;
float: left;
... ... @@ -1587,15 +1596,14 @@
.recommend-content {
position: relative;
height: 280px;
height: 410px;
overflow: hidden;
margin-top: 20px;
.recommend-slider {
margin: 0 80px;
width: 100%;
box-sizing: border-box;
width: 990px;
height: 280px;
height: 410px;
overflow: hidden;
}
... ... @@ -1605,8 +1613,8 @@
li {
float: left;
width: 202px;
height: 280px;
width: 232px;
height: 410px;
overflow: hidden;
}
... ... @@ -1641,8 +1649,8 @@
.good {
float: left;
width: 180px;
margin-right: 22px;
width: 225px;
margin-right: 10px;
a {
cursor: pointer;
... ... @@ -1654,8 +1662,8 @@
img {
display: block;
width: 180px;
height: 240px;
width: 222px;
height: 300px;
}
.name {
... ... @@ -1663,7 +1671,7 @@
max-width: 150px;
height: 18px;
line-height: 16px;
margin: 5px 0;
margin: 5px auto;
color: #222;
overflow: hidden;
text-overflow: ellipsis;
... ... @@ -1674,6 +1682,7 @@
color: #222;
font-weight: 700;
margin-top: 5px;
text-align: center;
}
.market-price {
... ...