http://jsfiddle.net/nicktheandroid/ppNaX/
This is somewhat theoretical. The menu shows/hides on mouseenter/mouseleave, with a toggle button to remove this functionality should a user find it annoying. In my example i have the element that triggers the toggle just showing it and not actually toggling it, but what I really want to know is, what’s the best way to do something like this?
Is there a better way to do it? Custom jQuery events? Using .data()? Could it be more advanced(silly?)? More simple? Benefits, pitfalls?
Conceptually all correct. Details can be improved:
Most of all — you need to stop the animation before running another one, because the user can do a mouseover while the menu is animated, leading to a mess.