Here's the code snippet I'm working with:
<div style="background-color:red;">
<ul class="myClass">
<li> CCD </li>
<li class="active"> BCA </li>
<li> ABC </li>
</ul>
</div
I am trying to automatically change the background color of the div when the class "active" is present. How can I target the li class when I only have the class for the ul element, and how can I use JavaScript to change the background color of this div?