views:

200

answers:

2

Is it possible to have YUI menus e.g. slide in as opposed to simply popping up?

+1  A: 

Of cause. You should set up SLIDE effect for the widget.

var oMenu = new YAHOO.widget.Menu( 
                        "productsandservices",  
                        { 
                            position: "static",  
                            hidedelay: 750,  
                            lazyload: true,  
                            effect: {  
                                effect: YAHOO.widget.ContainerEffect.SLIDE, 
                                duration: 0.25 
                            }  
                        } 
                );
Eldar Djafarov
Thanks for the answer. Using the SLIDE effect, the menus slide in from the margin of the page, whereas I would like them to slide in from the menu bar. I can use FADE, but it's not exactly the solution I am required to implement.
Robert Munteanu
A: 

One of the older (be careful as at the time I used it, it required patches) series of examples for YUI MenuBar hacks in this functionality using various events:

http://developer.yahoo.com/yui/examples/menu/topnavfrommarkupwithanim.html

I don't think this is available out of the box, which is a bummer. Another peeve of mine is that there's no (built-in) way to hide submenus automatically once the user has moused over some options. This makes sense for accessibility (and is the reason it is like that, according to the YUI team), but there's nothing I can do about clients who will only see it as broken.

Josh L