My current HTML layout looks like this..
<div class="container>
<div class="panel">
<div>
<div>
<div>
<img class="match" src="myimage.jpg">
</div>
</div>
</div>
</div>
<div class="panel">
<div>
<div class="item">
<div class="img_container">
<img class="match">
</div>
</div>
</div>
</div>
</div>
I am looking to transform it into the following layout..
<div class="container style="align-items: stretch;">
<div class="panel">
<div>
<div>
<div>
<img class="match" src="myimage.jpg">
</div>
</div>
</div>
</div>
<div class="panel">
<div style="height: 100%;">
<div class="item style="height: 100%;">
<div class="img_container" style="height: 100%;">
<img class="match" src="myimage.jpg">
</div>
</div>
</div>
</div>
</div>
Even after exploring CSS selectors, they are not suitable for this specific instance.
Is there a way to achieve this using jQuery? I want to check for the existence of the container class and then apply the CSS to the items.