Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
144
rated 0 times [  148] [ 4]  / answers: 1 / hits: 41896  / 13 Years ago, tue, may 31, 2011, 12:00:00
<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?


More From » jquery

 Answers
21

this should work:



$('a[title=Show Profile]').contents().unwrap();


Here a Fiddle with the proof.


[#91956] Monday, May 30, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
andreasn

Total Points: 238
Total Questions: 107
Total Answers: 111

Location: Ghana
Member since Sun, Mar 27, 2022
2 Years ago
;