Authored by 2586703@qq.com

热播位置修改

... ... @@ -446,21 +446,40 @@ define('yohood', function(require, exports) {
});
//侧栏相关推荐位置
relatedTop = $('.side-related-post').offset().top;
relatedPost = $('.side-related-post');
relatedTop = relatedTop.offset().top;
if (navigator.userAgent.indexOf('iPad') === -1) {
$(window).on('scroll', function() {
relatedTop = $('.app-download').offset().top + $('.app-download').outerHeight();
if (relatedTop <= $(this).scrollTop()) {
$('.side-related-post').css({
/*$('.side-related-post').css({
"position": "fixed",
"top": "0",
"left": "50%",
"width": "280px",
"marginLeft": "210px"
})
})*/
detailBodyOffsetTop = $('.detail-body').offset().top;
detailBodyHeight = $('.detail-body').outerHeight();
relatedPostsOffsetHeightTop = relatedPost.offset().top + relatedPost.outerHeight();
distance = detailBodyHeight + detailBodyOffsetTop;
eleTop = distance - relatedPost.outerHeight();
if (relatedPostsOffsetHeightTop >= distance) {
relatedPost.css({
'position': 'absolute',
'top': eleTop - relatedPostsTop
});
}
if (relatedPost.offset().top - $(window).scrollTop() > relatedPostsTop) {
relatedPost.css({
'position': 'fixed',
'top': relatedPostsTop
});
}
} else {
$('.side-related-post').removeAttr('style');
}
});
}
... ...
... ... @@ -25,7 +25,7 @@
<div class="brand-main">
<div class="search-wrap">
<input type="text" placeholder="搜索品牌...">
<a href="javascript:;" class="search-btn iconfont">&#xe604;</a>
<a href="javascript:;" class="search-btn iconfont">&#xe611;</a>
</div>
<div class="brand-content">
<ul class="brand-list cooperation-list clearfix">
... ...