@@ -23,7 +23,7 @@ See also the [Change Log](https://github.com/mar10/jquery-ui-contextmenu/blob/ma
23
23
24
24
## Demo
25
25
26
- [ Live demo page] ( http://wwwendt.de/tech/demo/jquery-contextmenu/demo/ ) :
26
+ [ Live demo page] ( http://wwwendt.de/tech/demo/jquery-contextmenu/demo/ ) :< br >
27
27
[ ![ sample] ( demo/teaser.png?raw=true ) ] ( http://wwwendt.de/tech/demo/jquery-contextmenu/demo/ " Live demo ")
28
28
29
29
@@ -130,17 +130,19 @@ see [jQueryUI menu] for details:
130
130
</ul >
131
131
```
132
132
133
- ** Note:** until jQuery UI 1.10 the use of anchors (` <a> ` ) in menu items was required:
133
+ ** Note:** until and including jQuery UI 1.10 the use of anchors (` <a> ` ) in menu items was required:
134
134
``` html
135
135
<ul id =" options" class =" ui-helper-hidden" >
136
136
<li data-command =" copy" ><a href =" #" ><span class =" ui-icon ui-icon-copy" ></span >Copy</a >
137
+ ...
137
138
</ul >
138
139
```
139
140
140
141
141
142
### Modify the menu depending on the context
142
143
143
- The menu can be modified before display in order to reflect the current context.
144
+ Often we need to modify the menu before it is displayed, in order to reflect the current context.
145
+ This can be done in the ` beforeOpen ` event:
144
146
145
147
``` js
146
148
$ (document ).contextmenu ({
@@ -398,7 +400,8 @@ $(...).contextmenu({
398
400
});
399
401
` ` `
400
402
401
- Follwing a list of available menu definition properties:
403
+ Following a list of available menu definition properties:
404
+
402
405
<dl>
403
406
<dt>action</dt>
404
407
<dd>
@@ -408,7 +411,7 @@ Follwing a list of available menu definition properties:
408
411
<dt>addClass</dt>
409
412
<dd>
410
413
Type: <code>String</code>, default: <code>""</code><br>
411
- Additional class name(s) to be added to the entries <li > element.
414
+ Additional class name(s) to be added to the entries <li > element.
412
415
Separate multiple class names with a space.<br>
413
416
Custom CSS may be applied like <code>.ui-menu .my-class { color: red; }</code>.
414
417
</dd>
@@ -438,11 +441,11 @@ Follwing a list of available menu definition properties:
438
441
</dd>
439
442
<dt>uiIcon</dt>
440
443
<dd>
441
- Type: <code>String</code>, default: "" <br>
444
+ Type: <code>String</code>, default: <code>""</code> <br>
442
445
If defined, an icon is added to the menu entry. For example passing
443
446
<code>"ui-icon-copy"</code> will generate this element:
444
447
<code><span class='ui-icon ui-icon-copy' /></code>.<br>
445
- See also <a href="http://api.jqueryui.com/theming/icons/">Icon Overview</a>.
448
+ See also the <a href="http://api.jqueryui.com/theming/icons/">Icon Overview</a>.
446
449
</dd>
447
450
448
451
</dl>
0 commit comments