WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Another one for the DIVs ; ), Guillermo, January 30, 2004
     Re:Another one for the DIVs ; ), Erik Arvidsson, February 1, 2004

Subject: Re:Another one for the DIVs ; ) From: Erik Arvidsson Date: February 1, 2004
You need to set a variable in some way telling which element is selected so that the mouse over/out handlers take that into account.

erik


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.



Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX