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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login