I'm trying to get text value inside an li
tag, but it has another tag that I don't want
example:
<ul>
<li><a class="close">x</a>text</li>
<li><a class="close">x</a>more text</li>
<li><a class="close">x</a>wohoooo more text</li>
</ul>
I can get tag like so
$("ul li").text();
but it also captures x from a
. How do I remove the a tag? There's gotta be a simple solution that I'm not familiar with,
Thanks!