I’ having a little trouble figuring this out. Is there a way to remove an image from a site page using Javascript if the image does not have an ID? Here’s the on the site page with the link URL:
<img src="https://storage.googleapis.com/icons/markup.png" alt="Mark Up Icon" width="40" height="40" data-decorative="true">
I’ve tried the following but it doesn’t seem to work:
$("img[src='https://storage.googleapis.com/icons/markup.png']").remove();
2
Answers
Thank you all! After a lot of testing, I ended up using Javascript and adding a 0.15 second time delay. It looks like the javascript was executing before the html was loaded. Not the most ideal solution, but it ended up working.
Your attribute selector has a problem. Try with double quotes instead of single quotes: