<div class="container">
<a href="#" class="link">asd</a>
[I want get this text]
<a href="#" class="link">asd</a>
Anouther text i dont need.
</div>
How can I withdraw the text between elements (not the inner text of elements, in this case I should get “[I want get this text]”)?
DEMO
I think the simplest way would be to deal with the native dom elements:
Note that
var text = textNode.nodeValue;will also work, but I’m not sure which is preferable.