Imagine you have a link on a webpage,
<a href="https://example.com/#sample"><p>Click Me</a>
When you click on that link, it immediately jumps to the specified id on the page. But what if instead of this abrupt jump, you want the page to smoothly scroll from the top to the id?
Another issue arises when there is a sticky menu overlapping the target id after the jump, adding more importance to the smooth scrolling solution.
If coding in jQuery isn't your forte, seeking help for this functionality may be necessary.
EDIT The initial wording might've caused confusion. The actual scenario involves a link on one page leading to an id on another page:
Let's say the Homepage contains the following link:
<a href="https://example.com/anotherPage/#sample"><p>Click Me</a>
The desired smooth-scrolling effect should take place on the "anotherPage," where the target id resides.
Your understanding of the requirement has been key in finding a suitable solution. Thank you to everyone offering their assistance.