I have the following link HTML:
<a href="#" onclick="run(1); return false;" class="link" title="Remove item">[x]</a>
and i want to use jquery to change this to be
<a href="#" onclick="run(1); return false;" class="link" title="Remove item">[x] Remove Item</a>
I want to keep the link and all of the attributes but change the text inside the link
You can get the text in the link with the text() function and set it back with the text(String) function like this:
And you can give your link a unique id if you wish to target just a single link rather than all elements with .link class.