I am using Javascript to try and loop through a list of divs with the same class name.I would like to change the box shadow and the border color on hover in JavaScript.So basically when my mouse is on the div the style changes then when my mouse is off the style reverts back. Here's what I've tried below:
var elements = document.getElementsByClassName("holla2");
for(i=0; i<elements.length; i++){
elements.onmouseover = function(){
element[i].backgroundColor = "black";
}
}