Help with my drop down menu?

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
Well, if it's any consolation, that menu is one of the best on-line games out there at the moment. It's also a great illustration of why I hate JavaScript menus in general, especially if they have transition effects. CSS-driven menus rely on the hover state of the underlying element. The mouse is either over the element or it isn't. JavaScript menus don't monitor the steady-state mouse position; they rely on the mouseover and mouseout events. The problem with doing things that way is that the code needs to notice the moment when the cursor crosses from outside the element to the inside (and vice-versa), and while the transition effect is happening (and the code can't listen) the mouseover or mouseout event can occur unnoticed. That seems to be the case with your menu -- you can mouse out while the expand transition is happening, and the menu gets stuck open until you mouse over again (then works "backwards"). Another couple of nudges and it's back to normal. Because the edges of the active areas aren't clearly visible, it's just too easy to fall of the edge of the earth, as it were, especially while the accordion transition is happening.
 

kariciu

New Member
Messages
2
Reaction score
0
Points
0
check the css. Seems like the sizes of the menu are wrong, and the javascript is geting the on hover event in an area where there should not be any element to triger an action. Or set the menu to execute the function on click , not on hover.
 
Top