I'm just trying to replace a link with some text, so I'm trying to use .after(), and then hide(). The link is hidden, but the replacement text does not appear.
var the_link = $(this);
What's wrong here? The examples I see online make this seem like it should work.
The below sample works fine for me.
<a id="the_link" href="">Test Link</a>
I suspect something else may be effecting your code. Can you show the rest of the code?
I suspect that since I was dealing with a link that was not always the same link, and I had to use "this", that somehow the usage was affected. Since I am bound by contract not to show the code, I can't post the actual code, but I fixed my problem by chaining hide on to the end of after: