~holger-seelig/cobweb.js/trunk

« back to all changes in this revision

Viewing changes to cobweb.js/lib/jquery-contextMenu/demo/on-dom-element.html

  • Committer: Holger Seelig
  • Date: 2017-08-22 04:53:24 UTC
  • Revision ID: holger.seelig@yahoo.de-20170822045324-4of4xxgt79669gbt
Switched to npm.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html>
2
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
3
 
<head>
4
 
    <meta charset="utf-8" />
5
 
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
 
    <title>Context Menu on DOM Element Demo - jQuery contextMenu Plugin</title>
7
 
    <meta name="description" content="simple contextMenu generator for interactive web applications based on jQuery" />
8
 
 
9
 
    <script src="../jquery-1.8.2.min.js" type="text/javascript"></script>
10
 
    <script src="../dist/jquery.ui.position.min.js" type="text/javascript"></script>
11
 
    <script src="../dist/jquery.contextMenu.min.js" type="text/javascript"></script>
12
 
    <script src="../prettify/prettify.js" type="text/javascript"></script>
13
 
    <script src="../screen.js" type="text/javascript"></script>
14
 
 
15
 
    <link href="../dist/jquery.contextMenu.min.css" rel="stylesheet" type="text/css" />
16
 
    <link href="../screen.css" rel="stylesheet" type="text/css" />
17
 
    <link href="../prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
18
 
 
19
 
    <script type="text/javascript">
20
 
 
21
 
      var _gaq = _gaq || [];
22
 
      _gaq.push(['_setAccount', 'UA-66438984-1']);
23
 
      _gaq.push(['_trackPageview']);
24
 
 
25
 
      (function() {
26
 
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
27
 
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
28
 
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
29
 
      })();
30
 
 
31
 
    </script>
32
 
    <style>
33
 
        #the-node {
34
 
            list-style: none;
35
 
            margin: 0; padding: 0;
36
 
        }
37
 
        #the-node > li > span {
38
 
            display: inline-block;
39
 
            background: #fff;
40
 
        }
41
 
        #the-node > li {
42
 
            background: #eee;
43
 
            padding: 20px;
44
 
        }
45
 
        #the-node > li:hover {
46
 
            background: #ddd;
47
 
        }
48
 
        #the-node > li + li {
49
 
            margin-top: 5px;
50
 
        }
51
 
    </style>
52
 
</head>
53
 
<body>
54
 
    <a id="github-forkme" href="https://github.com/swisnl/jQuery-contextMenu"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
55
 
    <div id="container">
56
 
    <h1><a href="https://github.com/swisnl/jQuery-contextMenu">jQuery contextMenu</a></h1>
57
 
    
58
 
    <ul class="menu">
59
 
        <li><a href="../index.html">About</a></li>
60
 
        <li class="active"><a href="../demo.html">Demo</a></li>
61
 
        <li><a href="../docs.html">Documentation</a></li>
62
 
        <li><a href="http://www.swis.nl/over-ons/bjorn-brala">Author</a></li>
63
 
    </ul>
64
 
 
65
 
    <h2 id="demo">Demo: Context Menu on DOM Element</h2>
66
 
    <p><code>jQuery.contextMenu</code> allows you to bind your menu to a DOM Element</p>
67
 
    <div class="inline-spaces">
68
 
<ul id="the-node">
69
 
    <li><span>right click me 1</span></li>
70
 
    <li><span>right click me 2</span></li>
71
 
    <li>right click me 3</li>
72
 
    <li>right click me 4</li>
73
 
</li>
74
 
    </div>
75
 
 
76
 
    <h3 id="code">Example code: Context Menu on DOM Element</h3>
77
 
    <script type="text/javascript" class="showcase">
78
 
$(function(){
79
 
    $('#the-node').contextMenu({
80
 
        selector: 'li', 
81
 
        callback: function(key, options) {
82
 
            var m = "clicked: " + key + " on " + $(this).text();
83
 
            window.console && console.log(m) || alert(m); 
84
 
        },
85
 
        items: {
86
 
            "edit": {name: "Edit", icon: "edit"},
87
 
            "cut": {name: "Cut", icon: "cut"},
88
 
            "copy": {name: "Copy", icon: "copy"},
89
 
            "paste": {name: "Paste", icon: "paste"},
90
 
            "delete": {name: "Delete", icon: "delete"},
91
 
            "sep1": "---------",
92
 
            "quit": {name: "Quit", icon: function($element, key, item){ return 'icon icon-quit'; }}
93
 
        }
94
 
    });
95
 
});
96
 
    </script>
97
 
 
98
 
    <h3 id="html">Example HTML: Context Menu on DOM Element</h3>
99
 
    <div style="display:none" class="showcase" data-showcase-import=".menu-1, .menu-1 + button"></div>
100
 
    
101
 
    <h2>jQuery Context Menu Demo Gallery</h2>
102
 
    <ul id="demo-list">
103
 
        <li><a href="../demo.html">Simple Context Menu</a></li>
104
 
        <li class="current"><a href="on-dom-element.html">Context Menu on DOM Element</a></li>
105
 
        <li><a href="dynamic.html">Adding new Context Menu Triggers</a></li>
106
 
        <li><a href="dynamic-create.html">Create Context Menu on demand</a></li>
107
 
        <li><a href="async-create.html">Create Context Menu (asynchronous)</a></li>
108
 
 
109
 
        <li><a href="keeping-contextmenu-open.html">Keeping the context menu open</a></li>
110
 
        <li><a href="callback.html">Command's action (callbacks)</a></li>
111
 
 
112
 
        <li><a href="trigger-left-click.html">Left-Click Trigger</a></li>
113
 
        <li><a href="trigger-swipe.html">Swipe Trigger</a></li>
114
 
        <li><a href="trigger-hover.html">Hover Activated Context Menu</a></li>
115
 
        <li><a href="trigger-hover-autohide.html">Hover Activated Context Menu With Autohide</a></li>
116
 
        <li><a href="trigger-custom.html">Custom Activated Context Menu</a></li>
117
 
 
118
 
        <li><a href="disabled-menu.html">Disabled Menu</a></li>
119
 
        <li><a href="disabled.html">Disabled Command</a></li>
120
 
        <li><a href="disabled-callback.html">Disabled Callback Command</a></li>
121
 
        <li><a href="disabled-changing.html">Changing Command's disabled status</a></li>
122
 
 
123
 
        <li><a href="accesskeys.html">Accesskeys</a></li>
124
 
        <li><a href="sub-menus.html">Submenus</a></li>
125
 
 
126
 
        <li><a href="input.html">Input Commands</a></li>
127
 
        <li><a href="custom-command.html">Custom Command Types</a></li>
128
 
        
129
 
        <li><a href="menu-title.html">Menus with titles</a></li>
130
 
 
131
 
        <li><a href="html5-import.html">Importing HTML5 &lt;menu type=&quot;context&quot;&gt;</a></li>
132
 
        <li><a href="html5-polyfill.html">HTML5 Polyfill</a></li>
133
 
        <li><a href="html5-polyfill-firefox8.html">HTML5 Polyfill (Firefox 8)</a></li>
134
 
    </ul>
135
 
    </div>
136
 
</body>
137
 
</html>
 
 
b'\\ No newline at end of file'