@@ -34,21 +34,21 @@ contextMenu.addItem("Hello World", function(){
34
34
// Examples of different ways to initialize a context menu:
35
35
36
36
// Initialize a context menu for the entire page
37
- var contextMenu = CtxMenu ();
37
+ var myContextMenu = CtxMenu ();
38
38
39
39
// Initialize a context menu for a element defined by it's id
40
- var contextMenu = CtxMenu (" #example" );
40
+ var myContextMenu = CtxMenu (" #example" );
41
41
42
42
// Initialize a context menu for a element defined by it's class
43
- var contextMenu = CtxMenu (" .example" );
43
+ var myContextMenu = CtxMenu (" .example" );
44
44
45
45
// Initialize a context menu for all types of a certain element by using a nodeName
46
46
// The example below will create a context menu for all paragraphs on the page (<p></p>)
47
- var contextMenu = CtxMenu (" p" );
47
+ var myContextMenu = CtxMenu (" p" );
48
48
49
49
// Initialize a context menu for a element variable
50
50
var myElement = document .getElementById (" example" );
51
- var contextMenu = CtxMenu (myElement);
51
+ var myContextMenu = CtxMenu (myElement);
52
52
```
53
53
54
54
### CtxMenu Functions:
@@ -82,7 +82,7 @@ _Insert a new item into the menu at given position_
82
82
| icon | Url to an icon to be displayed before the text |
83
83
84
84
``` javascript
85
- myContextMenu .addItem (0 , " Text Here" , myFunction, " myIcon.png" );
85
+ myContextMenu .insertItem (0 , " Text Here" , myFunction, " myIcon.png" );
86
86
```
87
87
88
88
0 commit comments