I am working with a jQuery carousel that is adding an 'active' class to images within a div. Within the same div, there is also a span with a 'fade' class that has a CSS style of opacity: 0. Is there a way to change the CSS style of the span class to opacity: 1 when the image (which is on the same level as the span tag) has the 'active' class applied to it, using either CSS or JavaScript?
<div>
<img src="image1" class="active">
<span class="fade">
<p>Text</p>
</span>
</div>