自定义zTree+easyui右键菜单
2015-11-20 09:44
609 查看
/* * 自定义zTree右键菜单 */ function zTreeOnRightClick(event, treeId, treeNode) { // 判断是否点击到tree节点上 if (!(!treeNode && event.target.tagName.toLowerCase() != "button" && $( event.target).parents("a").length == 0)) { //右键菜单事件 $('#czxs_rightMenu') .menu( { onClick : function(item) { if (item.name == 'addToBlank') { window .open( 'temp.html', 'newwindow', 'height=600, width=1000, top=20, left=150, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no'); } }, onHide : function() { $("#treeMenu").attr("onmouseout", "hideTreeMenu()"); }, onShow : function() { $("#treeMenu").attr("onmouseout", ""); } }); //菜单位置 $('#czxs_rightMenu').menu('show', { left : event.pageX, top : event.pageY }); } }
div
<!-- 左侧树形菜单 -->
<div id="treeMenu" onmouseover="showTreeMenu()"
onmouseout="hideTreeMenu()">
<ul id="positionzTree" class="ztree">
</ul>
<iframe id="blankFrame" frameborder="0"></iframe>
<div id="czxs_rightMenu" class="easyui-menu">
<div id="addNode" data-options="name:'addToBlank'">添加到新窗口查看</div>
</div>
</div>
相关文章推荐
- Java遍历文件夹&读取指定格式的文件zUI金
- easyui combobox 下拉框后台列表查询
- APICloud 图片轮播模块 UIScrollPicture
- 导航控制器UINavigationController
- 导航控制器UINavigationController
- Kibana User Guide [4.2] » Visualize » Area Chartsl
- 联想VIBE UI 固件ROM刷机包集合
- Android 总结:Message,MessageQueue,Looper,Handler 消息机制
- 2、UITextField的方法和属性
- iOS 为什么必须在主线程中操作UI
- UIAlertView更换为UIAlerController
- 关于队列(queues)dispatchFrom,dispatchFromArray
- easyUI 提交按钮linkbutton失效和恢复设置
- 使用xib 自定义UITableViewCell 按钮无法点击事件
- UINavigationController
- UIView,UIButton,UIImageView等设置圆角,设置阴影,设置边框的方法
- UE4代码规范
- 我的iOS学习历程 - 导航控制器(UINavigationController) + 界面之间的传值
- 我的iOS学习历程 - 导航控制器(UINavigationController) + 界面之间的传值
- UI 第八天 UINavigationController