Say that I have a link in a page,
<a href="https://example.com/#sample"><p>Click Me</a>
Clicking on the click gets you to the link in the href attribute. But because of how the gods work, it snaps immediately to the id in that page.
What I want to happen is that the page should not immediately go to the id, but start at the top of the page, and then smooth scroll to the id.
On a side note, the sticky menu is in the way, when it snaps to the id, its overlapped by the menu (one of the main reasons i want it to scroll instead).
jQuery isn't my strong suit.
Thank you to anyone who can help.
EDIT I don't think I worded this properly. The link with the a tag is on a different page than its target. For example:
The Homepage has the link
<a href="https://example.com/anotherPage/#sample"><p>Click Me</a>
There's a page called anotherPage that I would like scrolling to work on.
Sorry for not making this not detailed enough.
Thanks to anyone who replies.