<div class="news">
This is the important content
<figure class="summary">
This is unnecessary content
</figure>
</div>
I'm trying to retrieve "This is the important content" within the .news
class but without including "This is unnecessary content" in the .summary
class.
$("div.news").not("figure.summary").text()
Despite using this jQuery code, I am still capturing text within the figure tag.