menuslider 1.0
Slides an element down when the user interacts with a "toggler" element (think drop down menus). So long as the user mouses around inside either the toggler or the menu, it remains visible.
Details
- Author
- Aaron Newton
- Current version
- 1.0
- GitHub
- anutron/clientcide-menuslider
- Downloads
- 1346
- Category
- Interface
- Tags
- Report
- GitHub Issues
How to use
Requires
- MooTools More 1.2.3.1: Fx.Slide (and its dependences)
- HoverGroup (and its dependencies)
Syntax
new MenuSlider(menu, subMenu, options);
Arguments
- menu - (mixed) A string of the id for an Element or an Element reference for the menu item that triggers the slide down of the submenu
- submenu - (mixed) A string of the id for an Element or an Element reference that slides down into view when the user mouses over the menu
- options - (object) An object of key/value settings
Options
- onIn - (function) A callback executed when the menu slides in.
- onOut - (function) A callback executed when the menu slides out.
- hoverGroupOptions - (object) Values passed to the instance of [HoverGroup][] used by the class.
- fxOptions - (object) Values passed to the instance of [Fx.Morph][] used by the class.
- useIframeShim - (boolean; defaults to true) If true and IframeShim is present in your environment, the class integrates with IframeShim to shim the sub-menu.
- outFx - (boolean) if true the menu slides out when hidden; otherwise hides immediately (the default);
Example
var myMenu = new MenuSlider($('menuItem'), $('slideDown'));
Menuslider Method Slidein
Slides the submenu into view.
Example
myMenu.slideIn();
Returns
- object - This instance of MenuSlider.
Menuslider Method Slideout
Slides the submenu out of view. Note that, by default, there is no animation for this behavior.
Syntax
myMenu.slideOut(useFx);
Arguments
- useFx - (boolean) if false the menu hides immediately (same as calling .hide). If not specified, uses the value of outFx in the options (defaults to false).
Returns
- object - This instance of MenuSlider.
Menuslider Method Hide
Immediately hides the submenu.
Example
myMenu.hide();
Returns
- object - This instance of MenuSlider.
Menuslider Method Isvisible
Returns true if the slider is visible (or in the process of displaying).
Example
myMenu.isVisible(); //true if visible
Returns
- boolean - true if the slider is visible or in the process of displaying.
Discuss
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus