Jump to content

menu color change effect


domen

Recommended Posts

Hello!I want my navigation menu to change color on every mouse over and return to it's previous color when the mouse is not over it.the problem is that the code

onMouseOver="this.style.backgroundColor='Some_Color_Code_here'"

doesn't turn menu item into it's previous color.I know it can be done easyly with CSS, but I need to do it with JavaScript.

Link to comment
Share on other sites

Guest FirefoxRocks

Just use onmouseout to revert:

onmouseover="this.style.backgroundColor='Some_Color_Code_here_when_hovered_over'" onmouseout="this.style.backgroundColor='Some_Color_Code_here_when_mouse_leaves_the_box'"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...