I have html like this:
<div class="first">
    <div class="second home">
    </div>
</div>
<div class="first">
    <div class="second">
    </div>
</div>
Is it possible to style div element with class first if child div has home class?
I have html like this:
<div class="first">
    <div class="second home">
    </div>
</div>
<div class="first">
    <div class="second">
    </div>
</div>
Is it possible to style div element with class first if child div has home class?
 
    
    try something like this
$('.home').parent('div').addClass('first');
All child element with home than
    $('.home').each(function(){
        $(this).parent('div').addClass('first');
    });
