城东小巷分享 http://blog.sciencenet.cn/u/chengdong166

博文

jQuery-easyUI之menu(右键菜单)学习

已有 12711 次阅读 2013-8-20 20:54 |个人分类:jQuery学习|系统分类:科研笔记

Menu

Override defaults with $.fn.menu.defaults.

The menu is usually used for context menus. It is the base component for building other menu component such as menubutton and splitbutton. It also can be used for both navigation and executing commands.

 

jQuery点击右键触发展开菜单事件:

$(document).bind('contextmenu',function(e){

   e.preventDefault();
   $('#mm').menu('show', {
    left: e.pageX,
    top: e.pageY
   });
  });

 

LinkButton

Override defaults with $.fn.linkbutton.defaults.

The linkbutton is used to create a hyperlink button. It is a representation of a normal <a> tag. It can display both an icon and text, or only the icon or text. The button width can dynamic and shrink/expand to fit its text labels.

Properties:

toggle:true区分哪些按钮处于点击状态;

group:按钮的分类;

plain:True不凸起显示按钮,平板显示;

iconAlign:图标左对齐(left)还是右对齐(right);

disabled:True置灰按钮不可用;

 

SplitButton

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

Simalar to the menubutton, the splitbutton is also associated with linkbutton and menu. The difference between menubutton and splitbutton is that the splitbutton is split into two parts. When moving mouse over the splitbutton, a 'split' line will display. The menu only display when moving mouse over the right part of splitbutton.

 

MenuButton

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

The menubutton is the part of drop-down menu. It is associated with a linkbutton and menu. The linkbutton is displayed while the menu is hidden. When users click or move the mouse over the linkbutton, the menu will show to allow to click on it.

 

 

http://www.jeasyui.com/documentation/index.php#



https://blog.sciencenet.cn/blog-448935-718445.html

上一篇:jQuery-easyui之Panel学习
下一篇:jQuery-easyui之progressBar学习
收藏 IP: 122.82.219.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-7-18 01:31

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部