Tree Context Menu
Right click on a node to display context menu.
- My Documents
- Photos
- Program Files
- Intel
- Java
- Microsoft Office
- Games
- index.html
- about.html
- welcome.html
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Tree Context Menu - jQuery EasyUI Demo</title>
- <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
- <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
- <link rel="stylesheet" type="text/css" href="../demo.css">
- <script type="text/javascript" src="../../jquery.min.js"></script>
- <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
- </head>
- <body>
- <h2>Tree Context Menu</h2>
- <p>Right click on a node to display context menu.</p>
- <div style="margin:20px 0;"></div>
- <div class="easyui-panel" style="padding:5px">
- <ul id="tt" class="easyui-tree" data-options="
- url: 'tree_data1.json',
- method: 'get',
- animate: true,
- onContextMenu: function(e,node){
- e.preventDefault();
- $(this).tree('select',node.target);
- $('#mm').menu('show',{
- left: e.pageX,
- top: e.pageY
- });
- }
- "></ul>
- </div>
- <div id="mm" class="easyui-menu" style="width:120px;">
- <div onclick="append()" data-options="iconCls:'icon-add'">Append</div>
- <div onclick="removeit()" data-options="iconCls:'icon-remove'">Remove</div>
- <div class="menu-sep"></div>
- <div onclick="expand()">Expand</div>
- <div onclick="collapse()">Collapse</div>
- </div>
- <script type="text/javascript">
- function append(){
- var t = $('#tt');
- var node = t.tree('getSelected');
- t.tree('append', {
- parent: (node?node.target:null),
- data: [{
- text: 'new item1'
- },{
- text: 'new item2'
- }]
- });
- }
- function removeit(){
- var node = $('#tt').tree('getSelected');
- $('#tt').tree('remove', node.target);
- }
- function collapse(){
- var node = $('#tt').tree('getSelected');
- $('#tt').tree('collapse',node.target);
- }
- function expand(){
- var node = $('#tt').tree('getSelected');
- $('#tt').tree('expand',node.target);
- }
- </script>
- </body>
- </html>
Tree Context Menu的更多相关文章
- SAP Context menu(菜单)
*&---------------------------------------------------------------------* *& Report RSDEMO_CO ...
- Android Contextual Menus之一:floating context menu
Android Contextual Menus之一:floating context menu 上下文菜单 上下文相关的菜单(contextual menu)用来提供影响UI中特定item或者con ...
- create Context Menu in Windows Forms application using C# z
In this article let us see how to create Context Menu in Windows Forms application using C# Introduc ...
- Win7/Win8右键菜单管理工具(Easy Context Menu) v1.5 绿色版
软件名称: Win7/Win8右键菜单管理工具(Easy Context Menu)软件语言: 简体中文授权方式: 免费软件运行环境: Win8 / Win7 / Vista / WinXP软件大小: ...
- Description Resource Path Location Type Project configuration is not up-to-date with pom.xml. Select: Maven->Update Project... from the project context menu or use Quick Fix. spark-MT line 1 Maven Co
1.相信大家新建的maven项目,然后添加好依赖(即修改了pom.xml文件以后就会出现如下所示的错误): Description Resource Path Location Type Projec ...
- sublime text 3-right click context menu
dd a system wide windows explorer button " Edit with Sublime" similar to how Notepad++ doe ...
- 手机浏览器中屏蔽img的系统右键菜单context menu
我们知道通过oncontextmenu事件可以屏蔽浏览器右键菜单 $('img').on("contextmenu",function(E){E.preventDefault(); ...
- Android -- Options Menu,Context Menu,Popup Menu
Options Menu 创建选项菜单的步骤: 1. ...
- Vue 2.0 右键菜单组件 Vue Context Menu
Vue 2.0 右键菜单组件 Vue Context Menu https://juejin.im/entry/5976d14751882507db6e839c
随机推荐
- Android 如何让EditText不自动获取焦点
解决之道:在EditText的父级控件中找一个,设置成 android:focusable="true" android:focusableInTouchMode=&quo ...
- 用scanf输入字符串
char s[10];scanf("%s",s);改为scanf("%s",&s);也正确,为什么? 1 s与&s都表示地址,且值相等.2 s与 ...
- 类似于fopen与fopen64的种种情况
在Linux和unix系统中,我们会遇到¥和¥64的情况.比如stat64,fopen64等 fopen64是linux特有 的,fopen64()函数和fopen()函数相同的,只是底层的文件描述符 ...
- 制做RPM包
http://nmshuishui.blog.51cto.com/1850554/1583117 [root@NGM ~]# yum install pcre-devel zlib-devel ope ...
- .NET的堆和栈01,基本概念、值类型内存分配
当我们对.NET Framework的一些基本面了解之后,实际上,还是很有必要了解一些更底层的知识.比如.NET Framework是如何进行内存管理的,是如何垃圾回收的......这样,我们才能写出 ...
- vijos 1006 spfa **
链接:点我 spfa即可
- JAVA 正则表达式、汉字正则、 java正则代码
转自于:http://blog.csdn.net/q326527970/article/details/7513974 (一)字母.数字.下划线.汉字正则表达式 1. 只有字母.数字和下划线且不能以下 ...
- hdu 1181 变形课
变形课 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submis ...
- 贪心 Gym 100502E Opening Ceremony
题目传送门 /* 题意:有一堆砖块,每一次操作可以选择消去任意一行,也可以选择消去任意一列.求要消去所有的砖块需要最小的操作数 贪心:首先清楚的是消去最高列的最佳,消去第一行最佳,行列的顺序只对中间过 ...
- 关于配置文件权衡,.config VS .xml
众所周知,程序的灵活性有一部分就是“配”出来了. 当然,config文件从来就没有让.NET的同学轻松过,至少,我觉得很麻烦. 1.config .NET的配置文件方便,其实最方便的是appSetti ...