- // set the fade time and initially hide sub navs
- theSubNav.get('tween').options.duration=1000;
- theSubNav.fade('hide');
- // hover on causes sub nav to fade in
- theHover.addEvent('mouseover', function(event) {
- event = new Event(event).stop();
- theSubNav.fade('in');
- });
- // hover off causes sub nav to fade out
- theHover.addEvent('mouseout', function(event) {
- event = new Event(event).stop();
- theSubNav.fade('out');
- });
I'm creating a navigational sub-menu that is trigger by a parent image. Here's how I want it to work:
IMAGE HERE
Sub nav:
- 1
- 2
- 3
- etc...
On mouseover of the image, it will fade the subnav in.
On mouseout of the image, it will fade the subnav out HOWEVER if you are on the actual sub-nav itself, don't fade out.
Right now, I have a loop to set the fades for in and out for the image, but I can't figure out how to make the fade out not happen when you're on the sub-nav itself.
Any tips on making that last event (mouseout) happen only if "theSubNav" isn't being hovered upon itself.


