||View All MessagesBack to WebFX|
I have a series of DIVs that make up my nav bar. What I do is show some hidden divs below the primary divs, creating a collapsible menu. It's working ok right now, but I'd like to add some new settings.
Right now, the primary divs have "onmouseover" and "onmouseout" events. Onmouseover changes the div's class (setting a different backg color) and onmouseout restores the previous class.
What I'd like to do now is add another action to the "onclick" event (right now, onclick call a js function to "show" the hidden div below). I want to change it's class again (another backg color, showing that the div has been selected). The problem is, I can't seem to code it properly. I mean, I can change the class with onclick, but if I mouseover it again, the class is obviously changed (because it triggers the onmouseover event). I need to somehow "disable" the onmouseover event after the user has clicked on the div, and enable it back once he/she clicks it again.
Thanks a lot.