I have this code that checks if an img src is empty:
if (document.getElementById('featuredIconImage348790').src == "") {
document.getElementById('featuredIconImage348790').style.display = 'none';
}
The src is empty but the code does not hide the image? Is there a problem that I missed?
== ""part and see what happens. Is'featuredIconImage348790'really the HTMLidattribute for that image? Is that even an image? HTML please.console.log(document.getElementById('featuredIconImage348790').src)?