Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Commit 392c2c4

Browse files
committed
2 parents 1d20cb6 + e0ef6f5 commit 392c2c4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ contextMenu.addItem("Hello World", function(){
3434
// Examples of different ways to initialize a context menu:
3535

3636
// Initialize a context menu for the entire page
37-
var contextMenu = CtxMenu();
37+
var myContextMenu = CtxMenu();
3838

3939
// Initialize a context menu for a element defined by it's id
40-
var contextMenu = CtxMenu("#example");
40+
var myContextMenu = CtxMenu("#example");
4141

4242
// Initialize a context menu for a element defined by it's class
43-
var contextMenu = CtxMenu(".example");
43+
var myContextMenu = CtxMenu(".example");
4444

4545
// Initialize a context menu for all types of a certain element by using a nodeName
4646
// 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");
4848

4949
// Initialize a context menu for a element variable
5050
var myElement = document.getElementById("example");
51-
var contextMenu = CtxMenu(myElement);
51+
var myContextMenu = CtxMenu(myElement);
5252
```
5353

5454
### CtxMenu Functions:
@@ -82,7 +82,7 @@ _Insert a new item into the menu at given position_
8282
| icon | Url to an icon to be displayed before the text |
8383

8484
```javascript
85-
myContextMenu.addItem(0, "Text Here", myFunction, "myIcon.png");
85+
myContextMenu.insertItem(0, "Text Here", myFunction, "myIcon.png");
8686
```
8787

8888

0 commit comments

Comments
 (0)