How can I find div that contains specific text and delete this text from div.For example
<div>
DeleteText
<span>Something text</span>
<div>Something span inner text </div>
</div>
I need find div by text(DeleteText in example) and delete only this text from div.How can I do it.
Only DeleteText should be removed. All other html element and contents should be left as they are.
Use :contains to select the div and then filter the contents and remove the node.
DEMO: http://jsfiddle.net/YkEy5/