jQuery way to replace just a text node with a mix of HTML and text
- by hippietrail
In my web browser userscript project I need to replace just one text node without affecting the other HTML elements under the same parent node as the text. And I need to replace it with more than one node:
<div id="target">
some text<img src="/image.png">
</div>
Needs to become:
<div id="target">
<a…