Commit b9938b96 by halweg

Merge branch 'developer' of http://47.99.244.21:9999/root/joshine into developer

parents 00e9b58a 65a8b553
......@@ -24,19 +24,12 @@
var isMobile = window.matchMedia("(pointer:coarse)").matches;
if (isMobile) {
$(window).scroll(function () {
var checkoutBtn = $('.cart-container .checkout-methods-items li:first-child');
var scrollTop = $(document).scrollTop();
var wh = $(document.body).height();
var offsetTop = $(checkoutBtn).offset().top;
if (wh - offsetTop <= scrollTop) {
if(!$(checkoutBtn).hasClass('button-static')){
$(checkoutBtn).addClass('button-static');
}
var positionUl = $('.cart-container .checkout-methods-items li:first-child')
if (window.outerHeight + $(document).scrollTop() < $(positionUl).parent().offset().top + 50) {
$(positionUl).removeClass("button-static");
} else {
if($(checkoutBtn).hasClass('button-static'))
{
$(checkoutBtn).removeClass('button-static');
}
$(positionUl).addClass("button-static");
}
});
}
......
......@@ -496,6 +496,7 @@
padding: 5px 20px;
}
.button-fix {
width:100%!important;
position: fixed;
bottom: 0;
left: 0;
......@@ -818,15 +819,15 @@ script;
else {
$(window).scroll(function () {
if(!$('#checkout-step-shipping').is(":visible")) {
var scrollTop = $(document).scrollTop() - 120;
var wh = $(document.body).height();
var offsetTop = $('#checkout_place_order').offset().top;
if (wh - offsetTop <= scrollTop) {
//
$('#checkout_place_order').removeClass('button-fix');
$(window).scroll(function () {
var positionUl = $('#checkout_place_order')
if (window.outerHeight + $(document).scrollTop() < $(positionUl).offset().top + 50) {
$('#place-order').addClass("button-fix");
} else {
$('#checkout_place_order').addClass('button-fix');
$('#place-order').removeClass("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