What is wrong with this code? [JavaScript]
Everything works fine with id's, but I need it for more than 1 element. The point is to make a button that changes properties when user hovers cursor over it. I have tried to do mouseover[0],style[...] but it don't work either. function mouseover() { var mouseover = document.getElementsByClassName("other"); mouseover.style.backgroundColor = "#FF0000"; mouseover.style.border = " 3px solid rgba(130,0,0,1"; mouseover.style.boxShadow = " 0px 0px 60px rgba(130,0,0,1)"; mouseover.style.fontWeight = " bold"; } function mouseout() { var mouseout = document.getElementsByClassName("other"); mouseout.style.backgroundColor = "#820000"; mouseout.style.border = " 3px solid rgba(130,0,0,0)"; mouseout.style.boxShadow = " 0px 0px 30px rgba(130,0,0,0)"; mouseout.style.fontWeight = " normal"; }