Robert Munteanu
Robert Munteanu

Reputation: 68278

YUI menu with animation

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

Upvotes: 0

Views: 694

Answers (2)

Josh
Josh

Reputation: 1307

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.

Upvotes: 0

Eldar Djafarov
Eldar Djafarov

Reputation: 24685

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 
                            }  
                        } 
                ); 

Upvotes: 1

Related Questions