Im generating my page content on the serverside and sometimes as reault I have an image without src. Is it possible to hide all such images using jquery so that ugly icons arent visible for example in chrome ?
thanks for help
You are not supposed to have any <img/> tags without a src attribute!
But you can use $('img:not([src]), img[src=""]') to select images with empty or missing src attrs.
More complete answer derived from ThiefMaster would be on the following lines
$.each($('img:not([src]), img[src=""]'),function(index, value) {
value.css('display','none');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With