Currently, I'm looping through all my images and making their onmouseover/onmouseout events change their image with a for-loop.
var arrows = document.getElementsByClassName('arrow');
for (var i = 0; i < arrows.length; i++) {
arrows[i].onmouseover = arrows[i] + ".src = 'images/downarrow_hover.gif';";
arrows[i].onmouseout = arrows[i] + ".src = 'images/downarrow.gif';";
}
It's not working, am I doing this right?