I need help finding the <img>
tags within the structure below.
When found, add a "hasimg" class next to the "skuFiltro" class of the primary <ul>
tag. I need to recognize if it has an image or not to be able to differentiate the CSS style from the front-end structure of a platform I'm working on.
<ul class="skuFiltro">
<li>
<ul class="filterBlock">
<li>
<a href="#">
<img src="/img/teste.img" alt="">
</a>
</li>
</ul>
</li>
</ul>
<ul class="skuFiltro">
<li>
<ul class="filterBlock">
<li>
<a href="#">380mm</a>
</li>
</ul>
</li>
</ul>