I need to hide a link to the user so that he can’t click it to get to another page but I have several JS scripts and CSS that would take too much work to change so I need the document structure to stay the Same.
How can I achieve that?
This is an example
<span>
<a href="xxx">text</a>
</span>
I obviously tried to generate this instead
<span>text</span>
but selectors can’t find the text because there’s no “a” tag.
How can I achieve that?
To disable all the links, have such code:
Live test case.
This won’t change their destination (
hrefattribute) just cause that clicking them will have no effect whatsoever.