I want to remove the class description when the tag is <img>not found in all divs with .box1:
<ul class="radio accomodation-radio">
<li class="homeing-outer0 homeing-outer clearfix active" style="display: block;">
<div class="box1 clearfix">
<div class="description">
<p>Preis pro Person, nur Mehrbettzimmerbelegung. Sie teilen sich Hotelzimmer im Großraum Reykjavik und 2-4-Bett-Zimmer mit bezogenen Betten während der Tour.</p>
</div>
</div>
</li>....
I tried this, but this does not work:
$(".accomodation-radio").find(".box1 img").each( function(){
if ($(this).length === 0){
$(this).find("div").removeClass(".description");
}
});
Harry source
share