Stop scrolling to top when deleting a product from cart
-
Whenever I add multiple products and delete one of them it scrolls to top of the page to show msg that product is deleted. I want to stop this behavior and want to stay where it already is.
This was also happening when changing quantity and updating cart which I resolved by using this code. Any changes to this code so both could work?
Pls Helpvar timeout; jQuery( function( $ ) { $('.woocommerce').on('change', 'input.qty', function(){ if ( timeout !== undefined ) { clearTimeout( timeout ); } timeout = setTimeout(function() { $("[name='update_cart']").trigger("click"); document.location.reload(true); }); }); });
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Stop scrolling to top when deleting a product from cart’ is closed to new replies.