jQuery EasyUI menus and buttons - Creating a simple menu
Menu (Menu) is defined in some DIV tag, as follows:
<Div id = "mm" class = "easyui-menu" style = "width: 120px;"> <Div onclick = "javascript: alert ( 'new')"> New </ div> <Div> <Span> Open </ span> <Div style = "width: 150px;"> <Div> <b> Word </ b> </ div> <Div> Excel </ div> <Div> PowerPoint </ div> </ Div> </ Div> <Div icon = "icon-save"> Save </ div> <Div class = "menu-sep"> </ div> <Div> Exit </ div> </ Div>
After the menu is created is not displayed, call the 'show' method to display it, or call the 'hide' method to hide it:
$ ( '# Mm'). Menu ( 'show', { left: 200, top: 100 });