Possibly
$('.test').filter(function() { return !$(this).children('.example').length; });
This filters out any elements that have any child that matches .example
. If you want to filter based on descendants (not just children) that you can substitute .find
for .children
.