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 > Swipe Trigger 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 ="../jquery.touchSwipe.min.js " type ="text/javascript "> </ script >
11
+ < script src ="../src/jquery.ui.position.js " type ="text/javascript "> </ script >
12
+ < script src ="../src/jquery.contextMenu.js " type ="text/javascript "> </ script >
13
+ < script src ="../prettify/prettify.js " type ="text/javascript "> </ script >
14
+ < script src ="../screen.js " type ="text/javascript "> </ script >
15
+
16
+ < link href ="../src/jquery.contextMenu.css " rel ="stylesheet " type ="text/css " />
17
+ < link href ="../screen.css " rel ="stylesheet " type ="text/css " />
18
+ < link href ="../prettify/prettify.sunburst.css " rel ="stylesheet " type ="text/css " />
19
+
20
+ < script type ="text/javascript ">
21
+
22
+ var _gaq = _gaq || [ ] ;
23
+ _gaq . push ( [ '_setAccount' , 'UA-8922143-3' ] ) ;
24
+ _gaq . push ( [ '_trackPageview' ] ) ;
25
+
26
+ ( function ( ) {
27
+ var ga = document . createElement ( 'script' ) ; ga . type = 'text/javascript' ; ga . async = true ;
28
+ ga . src = ( 'https:' == document . location . protocol ? 'https://ssl' : 'http://www' ) + '.google-analytics.com/ga.js' ;
29
+ var s = document . getElementsByTagName ( 'script' ) [ 0 ] ; s . parentNode . insertBefore ( ga , s ) ;
30
+ } ) ( ) ;
31
+
32
+ </ script >
33
+ </ head >
34
+ < body >
35
+ < a id ="github-forkme " href ="https://github.com/medialize/jQuery-contextMenu "> < img src ="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png " alt ="Fork me on GitHub " /> </ a >
36
+ < div id ="container ">
37
+ < h1 > < a href ="https://github.com/medialize/jQuery-contextMenu "> jQuery contextMenu</ a > </ h1 >
38
+
39
+ < ul class ="menu ">
40
+ < li > < a href ="../index.html "> About</ a > </ li >
41
+ < li class ="active "> < a href ="../demo.html "> Demo</ a > </ li >
42
+ < li > < a href ="../docs.html "> Documentation</ a > </ li >
43
+ < li > < a href ="http://rodneyrehm.de/en/ "> Author</ a > </ li >
44
+ </ ul >
45
+
46
+ < h2 id ="demo "> Demo: Swipe Trigger</ h2 >
47
+
48
+ < p > This demo uses the (third party) < a href ="https://github.com/mattbryson/TouchSwipe-Jquery-Plugin "> TouchSwipe</ a > plugin.</ p >
49
+
50
+ < div class ="inline-spaces ">
51
+ < div class ="context-menu-one box menu-1 ">
52
+ < strong > swipe right</ strong >
53
+ </ div >
54
+ </ div >
55
+
56
+ < h3 id ="code "> Example code: Swipe Trigger</ h3 >
57
+ < script type ="text/javascript " class ="showcase ">
58
+ $ ( function ( ) {
59
+ // make swipe right open the menu
60
+ $ ( '.context-menu-one' ) . swipe ( {
61
+ // see http://labs.skinkers.com/touchSwipe/
62
+ swipe : function ( event , direction , distance , duration , fingerCount ) {
63
+ if ( fingerCount === 1 ) {
64
+ $ ( this ) . contextMenu ( {
65
+ x : event . changedTouches [ 0 ] . screenX ,
66
+ y : event . changedTouches [ 0 ] . screenY ,
67
+ } ) ;
68
+ }
69
+ }
70
+ } ) ;
71
+
72
+ $ . contextMenu ( {
73
+ selector : '.context-menu-one' ,
74
+ trigger : 'none' ,
75
+ callback : function ( key , options ) {
76
+ var m = "clicked: " + key ;
77
+ window . console && console . log ( m ) || alert ( m ) ;
78
+ } ,
79
+ items : {
80
+ "edit" : { name : "Edit" , icon : "edit" } ,
81
+ "cut" : { name : "Cut" , icon : "cut" } ,
82
+ "copy" : { name : "Copy" , icon : "copy" } ,
83
+ "paste" : { name : "Paste" , icon : "paste" } ,
84
+ "delete" : { name : "Delete" , icon : "delete" } ,
85
+ "sep1" : "---------" ,
86
+ "quit" : { name : "Quit" , icon : "quit" }
87
+ }
88
+ } ) ;
89
+ } ) ;
90
+ </ script >
91
+
92
+ < h3 id ="html "> Example HTML: Swipe Trigger</ h3 >
93
+ < div style ="display:none " class ="showcase " data-showcase-import =".menu-1 "> </ div >
94
+
95
+
96
+ < h2 > jQuery Context Menu Demo Gallery</ h2 >
97
+ < ul id ="demo-list ">
98
+ < li > < a href ="../demo.html "> Simple Context Menu</ a > </ li >
99
+ < li > < a href ="on-dom-element.html "> Context Menu on DOM Element</ a > </ li >
100
+ < li > < a href ="dynamic.html "> Adding new Context Menu Triggers</ a > </ li >
101
+ < li > < a href ="dynamic-create.html "> Create Context Menu on demand</ a > </ li >
102
+ < li > < a href ="async-create.html "> Create Context Menu (asynchronous)</ a > </ li >
103
+
104
+ < li > < a href ="keeping-contextmenu-open.html "> Keeping the context menu open</ a > </ li >
105
+ < li > < a href ="callback.html "> Command's action (callbacks)</ a > </ li >
106
+
107
+ < li > < a href ="trigger-left-click.html "> Left-Click Trigger</ a > </ li >
108
+ < li class ="current "> < a href ="trigger-swipe.html "> Swipe Trigger</ a > </ li >
109
+ < li > < a href ="trigger-hover.html "> Hover Activated Context Menu</ a > </ li >
110
+ < li > < a href ="trigger-hover-autohide.html "> Hover Activated Context Menu With Autohide</ a > </ li >
111
+ < li > < a href ="trigger-custom.html "> Custom Activated Context Menu</ a > </ li >
112
+
113
+ < li > < a href ="disabled-menu.html "> Disabled Menu</ a > </ li >
114
+ < li > < a href ="disabled.html "> Disabled Command</ a > </ li >
115
+ < li > < a href ="disabled-callback.html "> Disabled Callback Command</ a > </ li >
116
+ < li > < a href ="disabled-changing.html "> Changing Command's disabled status</ a > </ li >
117
+
118
+ < li > < a href ="accesskeys.html "> Accesskeys</ a > </ li >
119
+ < li > < a href ="sub-menus.html "> Submenus</ a > </ li >
120
+
121
+ < li > < a href ="input.html "> Input Commands</ a > </ li >
122
+ < li > < a href ="custom-command.html "> Custom Command Types</ a > </ li >
123
+
124
+ < li > < a href ="menu-title.html "> Menus with titles</ a > </ li >
125
+
126
+ < li > < a href ="html5-import.html "> Importing HTML5 <menu type="context"></ a > </ li >
127
+ < li > < a href ="html5-polyfill.html "> HTML5 Polyfill</ a > </ li >
128
+ < li > < a href ="html5-polyfill-firefox8.html "> HTML5 Polyfill (Firefox 8)</ a > </ li >
129
+ </ ul >
130
+ </ div >
131
+ </ body >
132
+ </ html >
0 commit comments