hover an element in js code example
Example 1: get hover element js
let test = document.getElementById("test");
test.addEventListener("mouseenter", function( event ) {
event.target.style.color = "purple";
setTimeout(function() {
event.target.style.color = "";
}, 500);
}, false);
Example 2: hover con js
imagenes[i].addEventListener("mouseover", function(e){
document.getElementById("mostrar").style.backgroundImage="url('"+e.target.currentSrc+"')";
});
imagenes[i].addEventListener("mouseout", function(e){
document.getElementById("mostrar").style.backgroundImage="";
});