How do I retrieve the textnode of a element without getting descending elements textnodes using Jquery?
<p><code>
&lt;a href="#"&gt;Domain name&lt;span class="value"&gt;2&lt;/span&gt;&lt;/a&gt;
</code></p>

<p>I would like to retrieve only the text "Domain name".</p>

<p>I have tried using $('a').text() but that will also get the text inside the descending SPAN tag. Is there a way to select only the first text node inside the A tag somehow?</p>

<p>I can't figure out how.</p>

<p>.contents('not:(span)') do not work either.</p>
