jQuery Traversing - has(selector)
$("div").has("p").css('border','2px solid red');
Reset
div element
div element
p element
div element
p element