Authored by 2586703@qq.com

fix定位js修改

... ... @@ -495,6 +495,8 @@ define('yohood', function(require, exports) {
maxH = $('.limited-goods').offset().top;
if ($('.bd').outerHeight() > $(window).height()) {
$(window).on('scroll', function() {
relatedH = relatedPost.outerHeight();
maxH = $('.limited-goods').offset().top;
if ($(this).scrollTop() >= relatedTop) {
relatedPost.addClass('fix');
if (relatedPost.offset().top + relatedH >= maxH && relatedPost.hasClass('fix')) {
... ... @@ -638,6 +640,8 @@ define('yohood', function(require, exports) {
maxH = $('.limited-goods').offset().top;
if ($('.bd').outerHeight() > $(window).height()) {
$(window).on('scroll', function() {
tabH = oTab.outerHeight();
maxH = $('.limited-goods').offset().top;
if ($(this).scrollTop() >= tabTop) {
oTab.addClass('fix');
if (oTab.offset().top + tabH >= maxH && oTab.hasClass('fix')) {
... ...