update to show footer. code review by XWG
Showing
1 changed file
with
12 additions
and
2 deletions
@@ -19,11 +19,21 @@ require('./desc'); | @@ -19,11 +19,21 @@ require('./desc'); | ||
19 | require('./comments-consults'); | 19 | require('./comments-consults'); |
20 | 20 | ||
21 | //add extra marign-bottom for footer to show the yoho copyright | 21 | //add extra marign-bottom for footer to show the yoho copyright |
22 | - | ||
23 | function showFooter() { | 22 | function showFooter() { |
23 | + var $cartBar = $('.cart-bar'); | ||
24 | + | ||
25 | + var timer = setInterval(function() { | ||
26 | + if ($cartBar) { | ||
24 | window.reMarginFooter('.cart-bar'); | 27 | window.reMarginFooter('.cart-bar'); |
28 | + clearInterval(timer); | ||
29 | + } else { | ||
30 | + $cartBar = $('.cart-bar'); | ||
31 | + } | ||
32 | + }, 200); | ||
25 | } | 33 | } |
26 | 34 | ||
35 | +showFooter(); | ||
36 | + | ||
27 | lazyLoad($('img.lazy')); | 37 | lazyLoad($('img.lazy')); |
28 | 38 | ||
29 | //顶部swiper | 39 | //顶部swiper |
@@ -57,6 +67,6 @@ if (goodsDiscountHammer) { | @@ -57,6 +67,6 @@ if (goodsDiscountHammer) { | ||
57 | }); | 67 | }); |
58 | } | 68 | } |
59 | 69 | ||
70 | + | ||
60 | require('./like'); | 71 | require('./like'); |
61 | 72 | ||
62 | -$(document).ready(showFooter); |
-
Please register or login to post a comment