JS – Apply style to parent if it has child with css

I’m ContentRow and only 50px

if($(‘#ContentRow’).hasClass(‘row Blue’)) {
$(“body”).addClass(“Blue”);

}

body {
background-color:red;
}

#ContentRow {
height:50px;
position:relative;
border:1px solid #000000;
}

.Blue {
background-color:blue;
}

.row {
color:red;
}

Leave a Reply

Your email address will not be published. Required fields are marked *