<a href="http://www.website.com/something" title="Show Profile">Mentalist</a>
Whenever a hyperlink has a title of "Show Profile" I want to remove the hyperlink and replace it with only with the text.
So instead of
<a href="http://www.website.com/something" title="Show Profile">Mentalist</a>
I want to have only Mentalist
.
Any idea how to solve that?
Clear Hyperlinks Without Changing Format Settings You can select a single cell, group of cells, or the entire worksheet. What is this? Under the Home tab, you will find the Clear option in the 'Editing' group. Click on it and select “Clear Hyperlinks” from the dropdown list.
Press Ctrl + A keys at the same time to select the whole document. 2. Next press Ctrl + Shift + F9 keys simultaneously to remove all hyperlinks in the current document.
Press the “Ctrl + A” hotkey to select all the text in the document. Press the “Ctrl + Shift + F9” hotkey to remove all the links.
this should work:
$('a[title="Show Profile"]').contents().unwrap();
Here a Fiddle with the proof.
This will do:
<a href="http://www.website.com/something" title="Show Profile">Mentalist</a> <a href="http://www.website.com/something" title="Something Else">Mentalist</a> <script type="text/javascript"> $("a[title='Show Profile']").each(function(){ $(this).replaceWith($(this).text()); }); </script>
It should replace only the first link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With