Anchor link reloads page before scrolling
-
Hi there,
I have a link which scrolls to an element on the same page but it reloads the page before going to the element.
See here for an example and click on, 'Book a Table': https://fivemarch.co.uk/gosangatsu
See how it scrolls to the booking element immediately but then reloads before scrolling to it again.
Is there a way where it will just scroll to it without needing to reload the page?
Thanks,
Alasdair
-
Dear Alasdair
@alasdair17
I see there are some 3rd party Plugins installed along with console errors.
It is likely your Wordpress back-end environment and not Lay Theme."Lay Theme is not responsible for compatibility with all 3rd-party plugins."
Wordpress, Lay Theme & Laytheme's Addons are all up to date ?
Any custom CSS or JS that may interfere is temporarily removed.
Any third-party plugins are de-activated to see if this resolves the issue.
Also you reference reloading page, check out AJAX in Lay Options :
Please test Lay Theme in this vanilla environment and see if the anchor works as it should. 🌝
From there you can add plugins back in 1 by 1 and see when the clash occurs - isolating the problem plugin.
Talk soon
Richard
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it