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
随机推荐
- 使用__declspec(export)导出C++类到DLL
使用举例: // File: SimpleDLLClass.h#ifdef SIMPLEDLL_EXPORT //在DLL工程属性-c/c++-预处理器-预处理器定义中添加此宏定义#define DL ...
- 数字型 、String字符串转换
Java代码 收藏代码 String str = "1,2,3,4,5,6" public int[] StringtoInt(String str) { int ret[] = ...
- p188习题2
- Oracle 操作 - 配置
http://blog.csdn.net/flyingbox/article/details/1823231 http://blog.csdn.net/libingquan008/article/de ...
- 通过扩展让ASP.NET Web API支持W3C的CORS规范(转载)
转载地址:http://www.cnblogs.com/artech/p/cors-4-asp-net-web-api-04.html CORS(Cross-Origin Resource Shari ...
- Java Hour 19 List
有句名言,叫做10000小时成为某一个领域的专家.姑且不辩论这句话是否正确,让我们到达10000小时的时候再回头来看吧. 本文作者Java 现经验约为19 Hour,请各位不吝赐教. List Arr ...
- struts2文件下载,动态设置资源地址
转自:http://blog.csdn.net/ctrl_shift_del/article/details/6277340 ServletActionContext.getServletContex ...
- Harris角点
1. 不同类型的角点 在现实世界中,角点对应于物体的拐角,道路的十字路口.丁字路口等.从图像分析的角度来定义角点可以有以下两种定义: 角点可以是两个边缘的角点: 角点是邻域内具有两个主方向的特征点: ...
- Codeforces Gym 100637A A. Nano alarm-clocks 前缀和处理
A. Nano alarm-clocks Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100637/p ...
- JavaScript表单提交四种方式
总结JavaScript表单提交四种方式 <!DOCTYPE html> <html> <head> <title>JavaScript表单提交四种方式 ...