I have
var $set = $(\'.foo,.bar\').filter( function() {return $(this).parents(\'.baz\').length < 1;});
as a way to select all the el
try this one:
$('div').filter(function () { return ($(this).parent().not('.baz')); })