I\'m trying to hide a parent div (i.e., #post) if the child div (i.e., .post-title) doesn\'t contain an tag. Any insight in how to accomplish this correct
You can simply use jQuery's .filter
Like so:
$('.post-title').filter(function(i) { return !$(this).find('a').length }).hide();
Link here NO LINK NO LINK Link here