http://www.zhangxinxu.com/wordpress/?p=1667

 <%@ page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>jQuerySmartMenuDemo</title>
<link rel="stylesheet" href="../component/alertifyjs/css/themes/bootstrap.min.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Sans:400,700">
<script type="text/javascript" src="../component/jquery-1.11.1.js"></script> <script type="text/javascript" src="../component/jQuerySmartMenu/js/jquery-smartMenu.js"></script>
<link rel="stylesheet" href="../component/jQuerySmartMenu/css/smartMenu.css">
<script type="text/javascript">
$(function() {
$("#table tr").bind("mousedown", function (e) {
$.smartMenu.remove();//重新加载smartMenu,这很重要,不然会使用html的缓存
if (e.which == 3) {
var opertionn = {
name: "",
offsetX: 2,
offsetY: 2,
textLimit: 10,
beforeShow: $.noop,
afterShow: $.noop
};
var oneObj = new Object;
oneObj.text = "标题";
oneObj.func = function(){
alert("我被点击了1");
};
var twoObj = new Object;
twoObj.text = "已读";
twoObj.func = function(){
alert("我被点击了2");
};
var imageMenuData = new Array();
var imageMenuDataChild = new Array();
imageMenuDataChild.push(oneObj);
imageMenuDataChild.push(twoObj);
imageMenuData.push(imageMenuDataChild);
$(this).smartMenu(imageMenuData,opertionn);
}
});
});
</script>
<style type="text/css">
</style>
</head>
<body>
<table id="table" class="table table-striped table-bordered table-condensed">
<tr>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
</tr>
<tr>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
</tr> <tr>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
</tr> <tr>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
<td>测试jQuerySmartMenu</td>
</tr> </table> </body>
</html>

jQuery smartMenu右键自定义上下文菜单插件的更多相关文章

  1. 【jQuery】smartMenu右键自定义上下文菜单插件(似web QQ)

    (前端用重点整理博客地址)链接地址:http://www.cnblogs.com/atree/archive/2011/06/30/jQuery-smartMenu-javascript.html 一 ...

  2. Mint linux 自定义上下文菜单实现ZIP压缩文件无乱码解压

    1. 前提条件 我的Mint Linux 是Thunar文件管理器(默认的). 2. 配置自定义动作 打开Thunar文件管理器,点击菜单“编辑”=>“配置自定义动作”.点击“+”添加一个新的. ...

  3. 自定义上下文菜单,contextmenu事件

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. .NET混合开发解决方案13 自定义WebView2中的上下文菜单

    系列目录     [已更新最新开发文章,点击查看详细] WebView2控件应用详解系列博客 .NET桌面程序集成Web网页开发的十种解决方案 .NET混合开发解决方案1 WebView2简介 .NE ...

  5. 如何添加“在这里打开PowerShell”到Windows中的上下文菜单

    It was only a matter of time, right? Due to my recent infatuation passionate love affair with PowerS ...

  6. Vue2的右键弹出菜单(vue-contextmenu)

    给大家推荐一个基于Vue2的右键弹出菜单插件,支持单一SPA页面以及可以在循环绑定中使用. 项目地址为:https://github.com/chIIC/vue-...demo1: 父组件绑定右键事件 ...

  7. 几款jQuery右键菜单插件介绍

    在网页中使用自定义右键菜单,实现上皆为使用javascript禁用浏览器默认的右键菜单,然后在网页中响应鼠标右键事件,弹出自定义的菜单. 类似右键菜单的组件网上很多.一般而言,改变浏览器的默认菜单应当 ...

  8. vue 右键菜单插件 简单、可扩展、样式自定义的右键菜单

    今天分享的不是技术,今天给大家分享个插件,针对现有的vue右键菜单插件,大多数都是需要使用插件本身自定义的标签,很多地方不方便,可扩展性也很低,所以我决定写了一款自定义指令调用右键菜单(vuerigh ...

  9. js进阶 12-18 jquery如何实现自定义右键菜单(把问题分细)

    js进阶 12-18  jquery如何实现自定义右键菜单(把问题分细) 一.总结 一句话总结:用鼠标右键事件contextmenu,阻止系统默认事件,让做好的右键菜单显示出来,并且显示在我们出现的位 ...

随机推荐

  1. surging 微服务框架使用系列之surging介绍

    首先,感谢surging的作者fanliang11为.net开源做出的贡献 其次, surging 的git地址:https://github.com/dotnetcore/surging surgi ...

  2. leak finder

    介绍 leak finder 是google开源团队发布了一个新的可以帮助web应用程序开发者在他们的JavaScript程序中找出内存泄露问题的工具: http://feedproxy.google ...

  3. EC+VO+SCOPE for ES3

    词法环境 词法作用域 词法作用域(lexcical scope).即JavaScript变量的作用域是在定义时决定而不是执行时决定,也就是说词法作用域取决于源码. 词法环境 用于定义特定变量和函数标识 ...

  4. asp.net -mvc框架复习(8)-实现用户登录模型部分的编写

    1.配置文件添加数据库连接字符串(web.config) 2.编写通用数据库访问类 (1)引入命名空间 using System.Configuration; (2) 定义连接字符串 (3)编写完成 ...

  5. 更改sql多条数据,更新替换字符串中固定的字符串

    需求产生的背景: 数据库里建库时插入了字典数据,可是这个字典数据,有一些是不准确的,所以就需要把一些固定的数据查出来替换掉. 问题解决逻辑: 大体逻辑是,首先把固定需要替换的字符串提取出来,赋值给变量 ...

  6. 2018年web前端学习路线图

    前端的的技术一直在变化,更新和变革,现在基本是三驾马车(vue,angualr,react)主导整个前端框架,但是无论对于新人或者有经验的程序员,这些知识在必须掌握 前端必会技能 上图罗列了整个前端的 ...

  7. scrapy_移除内容中html标签

    如何移除所获取内容中多余的html标签? 通过w3lib模块和re模块 #!/usr/bin/python3 # -*- coding: UTF-8 -*- __author__ = 'beimenc ...

  8. MyEclipse设置jsp页默认打开方式

    可以用来设置jsp页默认打开是代码编辑模式而不是半视图半代码的模式. 1.选择菜单Window→Preferences. 2.选择General→Editors→File Associations.在 ...

  9. ios MVVM实践 刷新网络请求+tableView展示数据

    [实现效果] [目录结构相关] 此示例展示用的是MVVM结构形式,表述如下 M:数据Model的存储,可以用来对属性进行处理.(即胖model概念,上图中xx万人订阅这个处理方法写在Model内) V ...

  10. 【转】Matlab作图语句小结

    之前用Matlab作图,从网上找了些别人的例子,然后慢慢调参数.其实对很多命令,特别是对句柄不是很了解,今天简单总结了一下.下面用几个例子来说明:     ]);  首先,gcf是当前figure对象 ...