Smooth scrolling doesn’t work on link click
-
Hi, somehow I can get the plugin to work and I am stuck. These are the link elements:
<a href="#cart-gifts" class="ps2id">My link</a>
And this is the target element:
<div id="cart-gifts"> ... </div>
Clicking the link jumps to the target and ignores the plugin’s offset (the same behavior as if the plugin wasn’t installed at all).
However, reloading the page with an anchor in URL (e.g. mysite.com/#cart-gifts) works just fine, it scrolls once the page is loaded with the proper offset.
Apart from the offset, all settings are default. I’ve also tried enabling
"Prevent other scripts from handling plugin’s links (if possible)"
with the following selector:a.ps2id
, but no luck.There shouldn’t be any conflicting plugins, the code is generated (both links and target) on Cart page using WooCommerce actions, so there is no page builder included or anything like that.
I am attaching the URL as well, but you need to add some products to the cart and then navigate to the Cart page, you should see a progress bar below header, then if you click the “Gift” icons, it should scroll you down to the #cart-gifts section.
What could be the issue? Thank you.
The page I need help with: [log in to see the link]
- The topic ‘Smooth scrolling doesn’t work on link click’ is closed to new replies.