I don’t know how to call it but let me call it semi-inner text.
Example
<div id='myDiv'>
This is the semi-inner text
<div id='other'></div>
This is the semi-inner text
<div>
I want to remove/replace those This is the semi-inner text using jquery.
How can I do that?
If you only care about child nodes…
jsFiddle.
If you want to check all descendant nodes, make the function recurse when it detects an element node (
this.nodeType == 1).