I have image tags in my html that have empty src attributes.
This causes bugs in different browsers.
I would like to remove all the image tags that have empty src dynamically
Html:
<div class="newsroom-item">
<article>
<figure>
<a href="/content/NewsRoom/648408.html">
<img src="" alt="" data-blog="" data-list="">
</a>
</figure>
</article>
</div>
I need help with the Javascript:
var figure = $('.newsarticle-list #newsarticlelist .newsroom-item figure a img');
$("figure[src='']").each(function () {
});
Just use jQuery
remove():