PREVENT PAGE SCROLLING (DESKTOP) WHEN SIDE CART IS OPENED
-
Hello, when the side-cart is opened (adding a product to cart) the page allows the vertical overflow scrolling… is possible to fix it please?
So when a user add a product to cart only see that sidebar and the page is fixed, then, when the closes that side-cart the page returns as usual.
Thanks
Hello,
When the shopping cart slides out it is fixed. And the page scroll remains as it was before the opening the cart. It is not possible to remove it.
Best Regards
H, I mean:
(function($) {
if ($(‘.cart-widget-side’).hasClass(‘woodmart-cart-opened’)) {
$(‘body’).addClass(‘fixed’)
} else {
$(‘body’).removeClass(‘fixed’)
};
})(jQuery);
or something in Vanilla.. but this doenst work at all…
An idea please?
Hello,
The browser scroll does not have classes. It is not possible to remove, unfortunately.
Best Regards