MenuButton

Extend from $.fn.linkbutton.defaults. Override defaults with $.fn.menubutton.defaults.

Dependencies

Usage

  1. <a href="javascript:void(0)" id="mb" iconCls="icon-edit">Edit</a>  
  2. <div id="mm" style="width:150px;">  
  3.     <div iconCls="icon-undo">Undo</div>  
  4.     <div iconCls="icon-redo">Redo</div>  
  5.     <div class="menu-sep"></div>  
  6.     <div>Cut</div>  
  7.     <div>Copy</div>  
  8.     <div>Paste</div>  
  9.     <div class="menu-sep"></div>  
  10.     <div iconCls="icon-remove">Delete</div>  
  11.     <div>Select All</div>  
  12. </div>  
  1. $('#mb').menubutton({  
  2.     menu: '#mm'  
  3. });  

Properties

The properties extend from linkbutton, below is the added properties for menubutton.

Name Type Description Default
plain boolean True to show plain effect. true
menu string A selector to create a corresponding menu. null
duration number Defines duration time in milliseconds to show menu when hovering the button. 100

Methods

Name Parameter Description
options none Return the options object.
disable none Disable the menubutton.
enable none Enable the menubutton.
destroy none Destroy the menubutton.