Can someone explain why my list elements are not turning blue when I hover over them, even with the CSS and JS provided below?
li { background:red; }
li:hover { background:blue; }
Here is the JS I am using:
document.getElementsByTagName("li")[0].style.backgroundColor="yellow";
I've tested this on both Chrome and FF and still no luck. Check out the example here: http://jsfiddle.net/42bQr/. Any suggestions on why this is happening?