How to remove span tag from string using jquery?
I have multiple span tag in string variable
<p>No Change<span style="color: #222222;"> </span>
I love cricket<span style="color: #222222;">Cricket cricket </span></p>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If this is definitely just stored as a string you can do the following…
if in fact this is already rendered html in your page then just do…
If you want to keep the contents of the span tag you can try this…
Here is a working example (you will see two alerts: string at start, string at end)
You can also just do this which might get the result you need: