Commit 65a8b553 by dhn

支付页按钮闪烁

parent 445b3cee
...@@ -496,6 +496,7 @@ ...@@ -496,6 +496,7 @@
padding: 5px 20px; padding: 5px 20px;
} }
.button-fix { .button-fix {
width:100%!important;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
...@@ -818,15 +819,15 @@ script; ...@@ -818,15 +819,15 @@ script;
else { else {
$(window).scroll(function () { $(window).scroll(function () {
if(!$('#checkout-step-shipping').is(":visible")) { if(!$('#checkout-step-shipping').is(":visible")) {
var scrollTop = $(document).scrollTop() - 120; $(window).scroll(function () {
var wh = $(document.body).height(); var positionUl = $('#checkout_place_order')
var offsetTop = $('#checkout_place_order').offset().top; if (window.outerHeight + $(document).scrollTop() < $(positionUl).offset().top + 50) {
if (wh - offsetTop <= scrollTop) { $('#place-order').addClass("button-fix");
// } else {
$('#checkout_place_order').removeClass('button-fix'); $('#place-order').removeClass("button-fix");
} else {
$('#checkout_place_order').addClass('button-fix'); }
} });
} }
}); });
......
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