Commit 0d999306 by dhn

购物车按钮闪烁问题

parent aeb545dc
......@@ -25,9 +25,10 @@
if (isMobile) {
$(window).scroll(function () {
var checkoutBtn = $('.cart-container .checkout-methods-items li:first-child');
var positionUl = $('.checkout-methods-items');
var scrollTop = $(document).scrollTop();
var wh = $(document.body).height();
var offsetTop = $(checkoutBtn).offset().top;
var offsetTop = $(positionUl).offset().top;
if (wh - offsetTop <= scrollTop) {
if(!$(checkoutBtn).hasClass('button-static')){
$(checkoutBtn).addClass('button-static');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment