style:category 和产品详情和详情样式调整
This commit is contained in:
@@ -101,6 +101,25 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
// 滚动到猜你喜欢部分,右边提交信息不固定
|
||||
$(window).scroll(function() {
|
||||
// 获取元素引用
|
||||
const blogContent = $('.blog_content');
|
||||
const rightSidebar = $('.orico_Page_articleDetail .articleDetailMain .atmright');
|
||||
|
||||
// 计算 blog_content 底部位置
|
||||
const contentBottom = blogContent.offset().top + blogContent.outerHeight();
|
||||
|
||||
// 计算视口底部位置
|
||||
const windowBottom = $(window).scrollTop() + $(window).height();
|
||||
|
||||
// 当视口底部超过 blog_content 底部时
|
||||
if (windowBottom >= contentBottom) {
|
||||
rightSidebar.css('position', 'static'); // 移除固定定位
|
||||
} else {
|
||||
rightSidebar.css('position', 'fixed'); // 恢复固定定位
|
||||
}
|
||||
});
|
||||
})
|
||||
function shareCustomers(){
|
||||
// 复制到粘贴板
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<!-- 产品介绍详情-->
|
||||
<div class="oriprInfo">
|
||||
<div class="titleprinfo">
|
||||
<a href="#detail">{:lang('product_detail.detail_section_title')}</a>
|
||||
<a href="#detail" class="checkshow">{:lang('product_detail.detail_section_title')}</a>
|
||||
<span>|</span>
|
||||
<a href="#related">{:lang('product_detail.related_products')}</a></div>
|
||||
<!-- 富文本渲染-->
|
||||
@@ -284,6 +284,18 @@
|
||||
}
|
||||
})
|
||||
});
|
||||
// 产品详情切换
|
||||
$('.titleprinfo a').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('.titleprinfo a').removeClass('checkshow');
|
||||
$(this).addClass('checkshow');
|
||||
var targetId = $(this).attr('href');
|
||||
if($(targetId).length) {
|
||||
$('html, body').animate({
|
||||
scrollTop: $(targetId).offset().top
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user