Authored by biao

show stander bottom when there is fixed bottom element on page

... ... @@ -106,6 +106,20 @@ function rePosFooter() {
}
}
/**
*
* add extra margin-bottom for footer to show yoho copyright when there is fixed bottom element on page
* @param {String} The jquery selecor of the fixed bottom element
* @return undefined
*/
function reMarginFooter(fixedElement) {
var fixedElH = $(fixedElement).outerHeight();
if(fixedElement){
$footer.css('margin-bottom', fixedElH + 'px');
}
}
//页面通用底部位置及status设置
(function() {
var $op = $footer.children('.op-row');
... ... @@ -215,3 +229,5 @@ window.getUid = getUid;
window.getShoppingKey = getShoppingKey;
window.rePosFooter = rePosFooter;
window.reMarginFooter = reMarginFooter;
... ...
... ... @@ -221,9 +221,7 @@ $('.home-header .iconfont').on('touchstart', function() {
});
// 底部留出tab 的高度
$('#yoho-footer').css({
'margin-bottom': '2.5rem'
});
window.reMarginFooter('.footer-tab');
//set cookie
exports.set = function(c) {
... ... @@ -231,4 +229,4 @@ exports.set = function(c) {
expires: 365,
domain: '.m.yohobuy.com'
});
};
\ No newline at end of file
};
... ...
... ... @@ -15,7 +15,8 @@ var goodsSwiper,
require('./desc');
require('./comments-consults');
//add extra marign-bottom for footer to show the yoho copyright
window.reMarginFooter('.cart-bar');
lazyLoad($('img.lazy'));
... ... @@ -46,4 +47,4 @@ $('.goodsDiscount .dropdown').on('click', function() {
$discountFolder.slideUp();
}
});
require('./like');
\ No newline at end of file
require('./like');
... ...