I've an HTML
<td class="abc"><b><span>NO</span>YES</b> ALL</td>
I am trying to get text of class abc without span tag. For eg. in above HTML I want only "YES ALL".
$('td.abc').text() returns NOYES ALL
$('td.abc').clone.find('span').remove().text() returns NO
Can anyone help me getting all text in above HTML except particular tag, here except tag span so that I could return "YES ALL". I want a one line solution.
.clone.findis just a typo (it should be.clone().find, it probably returns "NO", the text of thespanelement.