I have a selector like this:
$(source).find('.cb_notes').each(function() { .. } );
I would like to say ignore those .cb_notes that have any children.
e.g.:
<td class="cb_notes">huhuhu</td>
$($('.cb_notes')[0]).children().length –> 0 children, hence should be selected
and
<td class="cb_notes">
<span class="shortcontent"> .. </span>
<span class="allcontent"> .. </span>
<span> .. </span>
</td>
$($('.cb_notes')[1]).children().length –> 3 children, hence should be ignored
Therefore how do I have to modify the slector here:
$(source).find('.cb_notes') ?
Two solutions :