-
Notifications
You must be signed in to change notification settings - Fork 5
/
button.htm
109 lines (104 loc) · 3.99 KB
/
button.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Jeegoocontext, a jQuery contextmenu plugin</title>
<link href="style.css" rel="Stylesheet" type="text/css" />
<!-- Context menu default skin -->
<link href="jeegoocontext/skins/cm_default/style.css" rel="Stylesheet" type="text/css" />
<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="jeegoocontext/jquery.jeegoocontext-2.0.0.js"></script>
<script type="text/javascript">
//<![CDATA[
$(function(){
$('.button').jeegoocontext('menu', {
widthOverflowOffset: 0,
heightOverflowOffset: 1,
submenuLeftOffset: -4,
submenuTopOffset: -2,
event: 'click',
openBelowContext: true
});
});
//]]>
</script>
</head>
<body>
<div id="outer">
<div id="header">
<h1><span class="jg_red">J</span><span class="jg_green">ee</span><span class="jg_yellow">g</span><span class="jg_blue">oo</span>context, <span style="font-size:.7em">a jQuery contextmenu plugin</span></h1>
<h2>Copyright © 2009 - 2013 <a href="http://www.tweego.nl" target="_blank">TweeGo</a>: <a href="http://www.tweego.nl/jeegoocontext" target="_blank">http://www.tweego.nl/jeegoocontext</a></h2>
</div>
<div id="content">
<h2>Opening the menu by clicking a button.</h2>
<p>The menu can be opened by a button(or other element) by configuring the following options:</p>
<ul>
<li><strong>openBelowContext: true</strong>, this causes the contextmenu to open at the lowerleft corner of the context.</li>
<li><strong>event: click</strong>, this is the event used to open the menu, i.e. clicking the button.</li>
</ul>
<br />
<p>The options.startLeftOffset and option.startTopOffset properties can be used to offset the position of the menu<br />relative to the lowerleft corner of it's context.</p>
<input id="button1" class="button" type="button" value="Click me" />
<br />
<br />
<a href="suckerfish.htm" style="float:right">Dropdown menu >></a>
<a href="multiple_single.htm"><< onShow callback alternative</a>
</div>
</div>
<!-- Contextmenu -->
<ul id="menu" class="jeegoocontext cm_default">
<li class="font">
Item 1
<ul>
<li>
Item 1.1
<ul>
<li>Item 1.1.1</li>
<li>Item 1.1.2</li>
</ul>
</li>
<li>
Item 1.2
<ul>
<li>Item 1.2.1</li>
<li>Item 1.2.2</li>
</ul>
</li>
<li>
Item 1.3
<ul>
<li>Item 1.3.1</li>
<li>Item 1.3.2</li>
</ul>
</li>
</ul>
</li>
<li>
Item 2
<ul>
<li>Item 2.1</li>
<li>Item 2.2</li>
<li>Item 2.3</li>
</ul>
</li>
<li>
Item 3
<ul>
<li>Item 3.1</li>
<li>Item 3.2</li>
<li>Item 3.3</li>
<li>Item 3.4</li>
</ul>
</li>
<li>
Item 4
<ul>
<li>Item 4.1</li>
<li>Item 4.2</li>
<li>Item 4.3</li>
<li>Item 4.4</li>
<li>Item 4.5</li>
</ul>
</li>
</ul>
</body>
</html>