This question already has an answer here:
- Replace a link with it's text with jQuery 2 answers
i want to replace tags span.textReplace with the actual html
let say i've got a string dom what looks like this:
<div id="content">
hello world <span id="query1" class="textReplace">Query 1</span><br/>this is a test <span id="query2" class="textReplace">Query 2</span> this is <b>another</b> test <span id="query3" class="textReplace">Query3</span> finished
</div>
i want the html of #content to look like this:
hello world Query1
this is a test Query2 this is another test Query3 finished.