jQuery to remove a link and just replace it with anchor text

If you find this free website useful – why don’t you support this with a donation? It is easy…. read more ….

Occasionally a WordPress plugin is not templated, so difficult to customise the output, so in these circumstances one solution is to use jQuery to modify the output.

Now this is not pure and a bit hacky, as ideally you would change the code that is producing the output.  However the situation is just sometimes that isn’t the pragmatic or economic route.

The situation I had was a plugin I needed created a list of bullet points but each were links, and the links simply were not required.

The follow ‘fiddle’ shows how to remove links using jQuery.

http://jsfiddle.net/locally/tLLm34w4/


Posted

in

, ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *