Hey i need a list item to change colors depending on an hovering over it, but it is not working
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script>
var m = document.getElementById("Q");
m.addEventListener("mouse over", function(){
m.setAttribute("style", "background-color: #ccc;");
}, false);
</script>
<li>1</li>
<li id = "Q">Hello darkness my old friend</li>
<li>2</li>
</body>
</html>
I know I can use css to change backgound color
stylevalue you provide were valid.#redis not a colour value.