$(function() {
$('.target').parent().css('background-color', '#ffffaa'); // yellow
$('.target').parent('.parent').css('background-color', '#aaffaa'); // green
});
<div class="well">
should be yellow
<div class="label target">.target</div>
</div>
<div class="well parent">
should be green because of class="parent"
<div class="label target">.target</div>
</div>
<div class="well">
should be grey, because .parent() goes only one level up
<div class="well">
should be yellow
<div class="label target">.target</div>
</div>
</div>
External resources loaded into this fiddle: