domen Posted September 22, 2007 Share Posted September 22, 2007 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 More sharing options...
Guest FirefoxRocks Posted September 22, 2007 Share Posted September 22, 2007 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 More sharing options...
domen Posted September 22, 2007 Author Share Posted September 22, 2007 FirefoxRocksthanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.