javascript - image not switching in browser after i change source
<pre><code>function swapImg(imgId) {
    var image = document.getElementById(imgId);
    if (image.getAttribute("class") == "unselected") {
     image.setAttribute("src", "img/frownie.gif");
     console.log(image);
    } 
}
</code></pre>

<p>if i look at what's outputted to console, the src of the image is correct. but it's not changing in my browser. what's up? (ie, the image stays the same even though the source url is changing...)</p>
