function hoverHandler(e)
{
if(event.target.getAttribute("id") != "hovering")
{
event.target.setAttribute("id", "hovering");
}
}
This is the code I have, I also have a CSS that sets the color when id is hovering.
The problem:
1) As I am hovering, the color does not get reset back to previous color when I leave the element
try adding, and make sure your checking for
onmouseoutas wellor an inline event handlers could be
onmouseoutwould default back to the base style if any; or