how i can make an element hover with java script ? (not with mouse)
i mean i want to do an element hover with java script (in x and y) not with mouse , i want to make this with java script code
for example :
const element = document.querySelector("div");
setTimeout( ()=>{
// heer i need some code to make div hover in x: 80px and y:20px
}, 4000 )
div{
height: 100px;
width:100px;
background-color:red;
}
div:hover{
background-color:blue;
}
<div>
</div>