Level 1
Level 2
Bei der Community anmelden
Weitere Informationen
Melden Sie sich an, um alle Badges zu sehen
Leiste mit Community-Erfolgen erweitern.
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen 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?
Gelöst! Gehe zu Lösung.
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
Lösung in ursprünglichem Beitrag anzeigen
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
Zugriffe
Likes
Antworten