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) {
... ...
... ... @@ -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'));
... ...