Basically, I want to do the opposite of this: how do i hide anchor text without hiding the anchor
I’d like to be able to have a link on my page which under a certain set of client-side determined conditions would be able to deactivate the link, but still show the text. Is there any way to do this without having two separate elements (one with both the anchor and the text and one with just the text) and then flipping visibility between the two?
EDIT: Sorry, should have clarified. I’d like the link to not be styled like a link when it’s deactivated.
Replace the
<a>with a generic<span>, and back again.A simple strategy to replace would be:
—
This code isn’t complete, but just to give you an idea.