How do I use SLIDE instead of FADE in a YUI Menu animation?

Posted by Avry on Stack Overflow See other posts from Stack Overflow or by Avry
Published on 2011-01-17T07:50:34Z Indexed on 2011/01/17 7:53 UTC
Read the original article Hit count: 387

Filed under:
|

I'm using the following configuration for a menu that is attached to a button:

var srchTypeMenuConfig = { shadow: false,
                           effect: { 
                            effect: YAHOO.widget.ContainerEffect.FADE,
                            duration: .25 
                           }
                         };

I get a nice fade in and out for my menu when I click on the button; I'd rather have it slide in and out though. I replace YAHOO.widget.ContainerEffect.FADE with YAHOO.widget.ContainerEffect.SLIDE and the menu doesn't appear.

Is there a way for me to get YUI to give me the slide effect?

Here's what I've done so far:

1) Looked at the examples.

2) Looked at some effects examples from DavGlass' blog.

3) Searched the forums for 'ContainerEffect.SLIDE'.

4) Searched SO for 'ContainerEffect.SLIDE [YUI]'.

I haven't found any helpful information. I suspect that I need to add something to my configuration, but I don't understand why fade would work but slide doesn't.

© Stack Overflow or respective owner

Related posts about yui

Related posts about yui-menu