var $collection = $(".parent2").find(".child3").length; if ($collection.length)....
var elm = $('.parent1'); if(elm.has('.child3')){ var child3 = elm.find('.child3'); }