Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
This conversation has been locked due to inactivity. Please create a new post.
Hi,I'm using anchor links in page for some purpose within it. But when anchor link is clicked, it gets appended to URL in browser.
Suppose anchor link is #tab1, when it is clicked #tab1 gets added to URL (?wcmmode=disabled#tab1) which I don't want.
Is there any way I can stop this from happening?
Solved! Go to Solution.
Hi @sesmic,
As it is a browser feature you need to override the default behavior through the script. You might check this as well.
https://stackoverflow.com/questions/17012592/keep-url-unaffected-when-anchor-link-is-clicked
Hope this helps.
Regards,
Nitesh
View solution in original post
Hi@sesmic
anchor tag ids from the url can be hidden/removed by multiple ways as follows.
1. javascript - capture anchor tag click event and replace the unwanted tags
Check this video - #16 - Remove anchor link id tag and # on urls when loading a page - YouTube
(Reference How to hide anchor tag from URL using jQuery (deanha.com)
2. Using CSS - (Reference - html - How to hide an anchor tag by href #id using css - Stack Overflow)
Hope this helps
Thanks,
Chandra
Views
Likes
Replies