Reply 173039 to: How to stop the page scrolling to top after press add to cart button

Avatar: cyberone
cyberone
Participant
September 20, 2017 at 17:52

Hi,

It doesn’t help to enable “Ajax add to cart” in WooCommerce > settings
Enabling or disabling “Ajax add to cart”, the behaviour is same.

Searching Google, all solutions related to this problem pointing out to the following code that cause scrolling to top after pressing “Add to cart”:
“$(‘body,html’).animate({ scrollTop:” which is related to ajx-Cart.

You can find a lot of lines with the above code in the etheme.js and other places.
Which one is the correct one to comment out, that could stop the page scrolling to top after pressing “add to cart”?

I appreciate your help.
Best Regards

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.