I have the following HTML:
<img src="image.jpg" id="image" />
and that JavaScript:
jQuery(document).ready(
function($)
{
$('#image').attr('src', '');
}
);
But my problem is that the image is still there when the code is run.
I have notice by using the Chrome console, that the img element src is getting empty, but the image still there in the web site.
Any idea on how to remove the image? Note, if posible, I prefer to not remove the img element from the dom.
1 Answer