given the 2 alternative
<div class="no-text example">
100
</div>
<div class="with-text example">
<span class="surprise"> 50 </span>
100
</div>
I would like to get the number inside .example
in both cases, with the same selector OR somehow knowing the difference between .no-text
and .with-text
doing $(".example").text()
will give me 50 100
currently I am experimenting with .clone().children().remove().end().text()
but I need to somehow know it is .no-text
and .with-text