jQuery smartMenu 오른쪽 단 추 를 누 르 면 사용자 정의 컨 텍스트 메뉴 플러그 인

http://www.zhangxinxu.com/wordpress/?p=1667
 1 @ page contentType="text/html; charset=UTF-8"%>
 2 DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 3 <html>
 4 <head>
 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 6 <title>jQuerySmartMenuDemotitle>
 7 <link rel="stylesheet" href="../component/alertifyjs/css/themes/bootstrap.min.css">
 8 <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
 9 <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Sans:400,700">
10 <script type="text/javascript" src="../component/jquery-1.11.1.js">script>
11 
12 <script type="text/javascript" src="../component/jQuerySmartMenu/js/jquery-smartMenu.js">script>
13 <link rel="stylesheet" href="../component/jQuerySmartMenu/css/smartMenu.css">
14 <script type="text/javascript">
15 $(function() {
16     $("#table tr").bind("mousedown", function (e) {
17         $.smartMenu.remove();//    smartMenu,    ,     html   
18         if (e.which == 3) {
19             var opertionn = {
20                 name: "",
21                 offsetX: 2,
22                 offsetY: 2,
23                 textLimit: 10,
24                 beforeShow: $.noop,
25                 afterShow: $.noop
26             };
27             var oneObj = new Object;
28             oneObj.text = "  ";
29             oneObj.func = function(){
30                 alert("     1");
31             };
32             var twoObj = new Object;
33             twoObj.text = "  ";
34             twoObj.func = function(){
35                 alert("     2");
36             };
37             var imageMenuData = new Array();
38             var imageMenuDataChild = new Array();
39             imageMenuDataChild.push(oneObj);
40             imageMenuDataChild.push(twoObj);
41             imageMenuData.push(imageMenuDataChild);
42             $(this).smartMenu(imageMenuData,opertionn);
43         }
44     });
45 });
46 script>
47 <style type="text/css">
48 style>
49 head>
50 <body>
51     <table id="table"  class="table table-striped table-bordered table-condensed">
52         <tr>
53             <td>  jQuerySmartMenutd>
54             <td>  jQuerySmartMenutd>
55             <td>  jQuerySmartMenutd>
56             <td>  jQuerySmartMenutd>
57             <td>  jQuerySmartMenutd>
58         tr>
59         <tr>
60             <td>  jQuerySmartMenutd>
61             <td>  jQuerySmartMenutd>
62             <td>  jQuerySmartMenutd>
63             <td>  jQuerySmartMenutd>
64             <td>  jQuerySmartMenutd>
65         tr>
66 
67         <tr>
68             <td>  jQuerySmartMenutd>
69             <td>  jQuerySmartMenutd>
70             <td>  jQuerySmartMenutd>
71             <td>  jQuerySmartMenutd>
72             <td>  jQuerySmartMenutd>
73         tr>
74 
75         <tr>
76             <td>  jQuerySmartMenutd>
77             <td>  jQuerySmartMenutd>
78             <td>  jQuerySmartMenutd>
79             <td>  jQuerySmartMenutd>
80             <td>  jQuerySmartMenutd>
81         tr>
82 
83     table>
84 
85 body>
86 html>

 
다음으로 전송:https://www.cnblogs.com/sun-space/p/5696918.html

좋은 웹페이지 즐겨찾기