Why is mouse on hover in javascript is not working with classes but works on ids?
for example,
 window.onload = function() {
    var myIcon = document.getElementsByClassName('myIcon'); //does not work
    myIcon.onmouseover = function() {
        // do something
        return false;
    };
};   
but
window.onload = function() {
    var myIcon = document.getElementsByID('myIcon'); //works 
    myIcon.onmouseover = function() {
        // do something
        return false;
    };
};   
 
     
    